tcp_should_send_recvwindow: Add a few ninfo()

This commit is contained in:
YAMAMOTO Takashi 2021-06-09 13:10:58 +09:00 committed by Xiang Xiao
parent 14ec75e7fc
commit 0347cd3f09

View File

@ -236,6 +236,10 @@ bool tcp_should_send_recvwindow(FAR struct tcp_conn_s *conn)
if (win <= oldwin) if (win <= oldwin)
{ {
ninfo("tcp_should_send_recvwindow: false: "
"rcvseq=%" PRIu32 ", rcv_adv=%" PRIu32 ", "
"old win=%" PRIu16 ", new win=%" PRIu16 "\n",
rcvseq, conn->rcv_adv, oldwin, win);
return false; return false;
} }
@ -252,6 +256,9 @@ bool tcp_should_send_recvwindow(FAR struct tcp_conn_s *conn)
maxwin = tcp_maxrcvwin(conn); maxwin = tcp_maxrcvwin(conn);
if (2 * adv >= maxwin) if (2 * adv >= maxwin)
{ {
ninfo("tcp_should_send_recvwindow: true: "
"adv=%" PRIu16 ", maxwin=%" PRIu16 "\n",
adv, maxwin);
return true; return true;
} }
@ -262,8 +269,14 @@ bool tcp_should_send_recvwindow(FAR struct tcp_conn_s *conn)
mss = tcp_rx_mss(dev); mss = tcp_rx_mss(dev);
if (adv >= 2 * mss) if (adv >= 2 * mss)
{ {
ninfo("tcp_should_send_recvwindow: true: "
"adv=%" PRIu16 ", mss=%" PRIu16 ", maxwin=%" PRIu16 "\n",
adv, mss, maxwin);
return true; return true;
} }
ninfo("tcp_should_send_recvwindow: false: "
"adv=%" PRIu16 ", mss=%" PRIu16 ", maxwin=%" PRIu16 "\n",
adv, mss, maxwin);
return false; return false;
} }