Browse Source

Fixed #TSB-1234 test

ilucky.si 1 năm trước cách đây
mục cha
commit
ee5bd8ace5
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      ebpftracer/ebpf/l7/l7.c

+ 2 - 2
ebpftracer/ebpf/l7/l7.c

@@ -225,7 +225,7 @@ struct __socket_data_buffer {
 	__u32 events_num;
 	__u32 len; // data部分长度  max_len=32768
 	// struct l7_event data_buff[16]; // 超过多少条就发送
-	char data[32760]; // 32760 + len(4bytes) + events_num(4bytes) = 2^15 = 32768
+	unsigned char data[32760]; // 32760 + len(4bytes) + events_num(4bytes) = 2^15 = 32768
 };
 // MAP_PERARRAY(data_buf, __u32, struct __socket_data_buffer, 1)
 //struct bpf_map_def SEC("maps") data_buf = {
@@ -236,7 +236,7 @@ struct __socket_data_buffer {
 //};
 struct {
      __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);   // IK: BPF_MAP_TYPE_PERCPU_ARRAY类型的map数据是放在内存中的...
-     __type(key, __u32);
+     __type(key, int);
      __type(value, struct __socket_data_buffer);
      __uint(max_entries, 1);
 } data_buf SEC(".maps");