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

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


The following commit(s) were added to refs/heads/reduce-handle-connect-time by 
this push:
     new feece18  fix data id missing
feece18 is described below

commit feece18afad5ff13ec449ccfc44ba371cef7b4bd
Author: mrproliu <[email protected]>
AuthorDate: Fri Dec 27 16:25:19 2024 +0800

    fix data id missing
---
 bpf/accesslog/common/data_args.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/bpf/accesslog/common/data_args.h b/bpf/accesslog/common/data_args.h
index 2d76062..e19d0bc 100644
--- a/bpf/accesslog/common/data_args.h
+++ b/bpf/accesslog/common/data_args.h
@@ -66,14 +66,14 @@ struct sock_data_args_t {
 };
 struct {
        __uint(type, BPF_MAP_TYPE_HASH);
-       __uint(max_entries, 10000);
+       __uint(max_entries, 65535);
        __type(key, __u64);
        __type(value, struct sock_data_args_t);
 } socket_data_args SEC(".maps");
 
 struct {
-       __uint(type, BPF_MAP_TYPE_HASH);
-       __uint(max_entries, 10000);
+       __uint(type, BPF_MAP_TYPE_LRU_HASH);
+       __uint(max_entries, 65535);
        __type(key, __u64);
        __type(value, __u64);
 } socket_data_id_generate_map SEC(".maps");
@@ -93,6 +93,7 @@ static __inline __u64 generate_socket_data_id(__u64 id, __u32 
fd, __u32 func_nam
     __u64 key = ((__u64)tgid << 32) | fd;
     if (check) {
         if (tgid_should_trace(tgid) == false) {
+            bpf_printk("---test11111");
             return 0;
         }
     }
@@ -102,6 +103,7 @@ static __inline __u64 generate_socket_data_id(__u64 id, 
__u32 fd, __u32 func_nam
         bpf_map_update_elem(&socket_data_id_generate_map, &key, &tmp, 
BPF_NOEXIST);
         data_id = bpf_map_lookup_elem(&socket_data_id_generate_map, &key);
         if (!data_id) {
+            bpf_printk("---test222222222");
             return 0;
         }
     }

Reply via email to