Skip to content

Commit

Permalink
TCP: Add more connection debug logs from TCP workers
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Jul 15, 2024
1 parent 759d08f commit 4074f87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/dbg/struct_hist.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#define SH_ALL_VERBS(VERB_FUN) \
VERB_FUN(TCP_SEND2CHILD) \
VERB_FUN(TCP_SEND2MAIN) \
VERB_FUN(TCP_ADD_READER) \
VERB_FUN(TCP_REF) \
VERB_FUN(TCP_UNREF) \
VERB_FUN(TCP_DESTROY) \
Expand Down
5 changes: 5 additions & 0 deletions net/net_tcp_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ int tcp_done_reading(struct tcp_connection* con)
tcpconn_check_del(con);
tcpconn_listrm(tcp_conn_lst, con, c_next, c_prev);
if (con->fd!=-1) { close(con->fd); con->fd = -1; }
sh_log(con->hist, TCP_SEND2MAIN,
"parallel read OK - releasing, ref: %d", con->refcnt);
tcpconn_release(con, CONN_RELEASE, 0, 1 /*as TCP proc*/);

_tcp_done_reading_marker = 1;
Expand Down Expand Up @@ -285,6 +287,9 @@ inline static int handle_io(struct fd_map* fm, int idx,int event_type)
goto con_error;
}

sh_log(con->hist, TCP_ADD_READER, "add reader fd %d, ref: %d",
s, con->refcnt);

/* mark that the connection is currently in our process
future writes to this con won't have to acquire FD */
con->proc_id = process_no;
Expand Down

0 comments on commit 4074f87

Please sign in to comment.