xiaoxiang781216 commented on code in PR #7914:
URL: https://github.com/apache/nuttx/pull/7914#discussion_r1051600356


##########
net/tcp/tcp_recvwindow.c:
##########
@@ -163,7 +165,29 @@ uint32_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
       tailroom = 0;
     }
 
+  /* Get the number of buffers that the NIC needs to reserved */
+
+  niob_reserved = 0;
+  iob = dev->d_iob;
+
+  while (iob != NULL)
+    {
+      niob_reserved++;
+      iob = iob->io_flink;
+    }
+
+  niob_reserved = ((NETDEV_PKTSIZE(dev) + (CONFIG_IOB_BUFSIZE - 1)) /

Review Comment:
   why need adjust niob_reserved



##########
net/tcp/tcp_recvwindow.c:
##########
@@ -163,7 +165,29 @@ uint32_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
       tailroom = 0;
     }
 
+  /* Get the number of buffers that the NIC needs to reserved */
+
+  niob_reserved = 0;
+  iob = dev->d_iob;
+
+  while (iob != NULL)

Review Comment:
   should we add iob function for counting?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to