You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/14 02:20:36 UTC
[incubator-nuttx] 03/03: tcp_should_send_recvwindow: Add a few
ninfo()
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 0347cd3f093cc3af99fa03ea5d59b84fe0109d7c
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Jun 9 13:10:58 2021 +0900
tcp_should_send_recvwindow: Add a few ninfo()
---
net/tcp/tcp_recvwindow.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/net/tcp/tcp_recvwindow.c b/net/tcp/tcp_recvwindow.c
index 0008382..4411c50 100644
--- a/net/tcp/tcp_recvwindow.c
+++ b/net/tcp/tcp_recvwindow.c
@@ -236,6 +236,10 @@ bool tcp_should_send_recvwindow(FAR struct tcp_conn_s *conn)
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;
}
@@ -252,6 +256,9 @@ bool tcp_should_send_recvwindow(FAR struct tcp_conn_s *conn)
maxwin = tcp_maxrcvwin(conn);
if (2 * adv >= maxwin)
{
+ ninfo("tcp_should_send_recvwindow: true: "
+ "adv=%" PRIu16 ", maxwin=%" PRIu16 "\n",
+ adv, maxwin);
return true;
}
@@ -262,8 +269,14 @@ bool tcp_should_send_recvwindow(FAR struct tcp_conn_s *conn)
mss = tcp_rx_mss(dev);
if (adv >= 2 * mss)
{
+ ninfo("tcp_should_send_recvwindow: true: "
+ "adv=%" PRIu16 ", mss=%" PRIu16 ", maxwin=%" PRIu16 "\n",
+ adv, mss, maxwin);
return true;
}
+ ninfo("tcp_should_send_recvwindow: false: "
+ "adv=%" PRIu16 ", mss=%" PRIu16 ", maxwin=%" PRIu16 "\n",
+ adv, mss, maxwin);
return false;
}