Skip to content

Commit

Permalink
fix(bpf): fix stack size limit exceeded
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyoush committed Jan 10, 2025
1 parent 14dd7bb commit a5af434
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bpf/pktlatency.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,15 +1339,17 @@ static __always_inline void process_syscall_data(void* ctx, struct data_args *ar
tcp_sk = get_socket_from_fd(args->fd);
if (tcp_sk) {
int zero = 0;
// struct conn_info_t *new_conn_info = bpf_map_lookup_elem(&conn_info_t_map, &zero);
struct conn_info_t _new_conn_info = {};
struct conn_info_t *new_conn_info = &_new_conn_info;
struct conn_info_t *new_conn_info = bpf_map_lookup_elem(&conn_info_t_map, &zero);
// struct conn_info_t _new_conn_info = {};
// struct conn_info_t *new_conn_info = &_new_conn_info;
if (new_conn_info) {
new_conn_info->protocol = kProtocolUnset;
bool created = create_conn_info_in_data_syscall(ctx, tcp_sk, tgid_fd, direct, bytes_count, new_conn_info);
if (created) {
conn_info = bpf_map_lookup_elem(&conn_info_map, &tgid_fd);
}
} else {
return;
}
}
}
Expand Down

0 comments on commit a5af434

Please sign in to comment.