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 2020/11/29 05:24:55 UTC

[incubator-nuttx] branch master updated: net/tcp: correct the available iobs count if throttle is enabled

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


The following commit(s) were added to refs/heads/master by this push:
     new 234d3df  net/tcp: correct the available iobs count if throttle is enabled
234d3df is described below

commit 234d3df19f88d7526715f6cef3d5637ad2869580
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu Nov 26 18:06:13 2020 +0800

    net/tcp: correct the available iobs count if throttle is enabled
    
    The number of available iobs is already sub in iob_navail(true) on line 114
    
    net/tcp/tcp_recvwindow.c:
    ...
     73 uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev)
    ...
    114   niob_avail    = iob_navail(true);
    
    Change-Id: I230927904d8db08ed8d95d7fa18c5c5fce08aa5e
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 net/tcp/tcp_recvwindow.c | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git a/net/tcp/tcp_recvwindow.c b/net/tcp/tcp_recvwindow.c
index 708843d..8de655d 100644
--- a/net/tcp/tcp_recvwindow.c
+++ b/net/tcp/tcp_recvwindow.c
@@ -115,24 +115,6 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
   niob_avail    = iob_navail(true);
   nqentry_avail = iob_qentry_navail();
 
-  /* Are the read-ahead allocations throttled?  If so, then not all of these
-   * IOBs are available for read-ahead buffering.
-   *
-   * REVISIT: Should also check that there is at least one available IOB
-   * chain.
-   */
-
-#if CONFIG_IOB_THROTTLE > 0
-  if (niob_avail > CONFIG_IOB_THROTTLE)
-    {
-      niob_avail -= CONFIG_IOB_THROTTLE;
-    }
-  else
-    {
-      niob_avail = 0;
-    }
-#endif
-
   /* Is there a a queue entry and IOBs available for read-ahead buffering? */
 
   if (nqentry_avail > 0 && niob_avail > 0)