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/11/04 18:33:07 UTC

[incubator-nuttx] branch master updated (022c067 -> 37141bb)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 022c067  socket_rpmsg: use ns_bound to send SYNC packet
     new 1550a52  tcp_send_unbuffered.c: unifdef -UCONFIG_NET_TCP_SPLIT
     new 28d168e  tcp_send_unbuffered.c: Fix nxstyle errors
     new ecd6a35  net/tcp/Kconfig: Remove NET_TCP_SPLIT
     new 37141bb  Refresh configs after the removal of NET_TCP_SPLIT

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../olimex-lpc1766stk/configs/hidmouse/defconfig   |  1 -
 .../olimex-lpc1766stk/configs/nsh/defconfig        |  1 -
 .../olimex-lpc1766stk/configs/zmodem/defconfig     |  1 -
 .../zkit-arm-1769/configs/nsh/defconfig            |  1 -
 .../zkit-arm-1769/configs/nxhello/defconfig        |  1 -
 .../stm32/stm32butterfly2/configs/nshnet/defconfig |  1 -
 net/tcp/Kconfig                                    | 28 -------
 net/tcp/tcp_send_unbuffered.c                      | 96 ----------------------
 8 files changed, 130 deletions(-)

[incubator-nuttx] 02/04: tcp_send_unbuffered.c: Fix nxstyle errors

Posted by xi...@apache.org.
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 28d168e1b8b60df41b157977935ead0af4cc835e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Oct 13 10:48:16 2021 +0900

    tcp_send_unbuffered.c: Fix nxstyle errors
---
 net/tcp/tcp_send_unbuffered.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c
index 359da8c..c309e27 100644
--- a/net/tcp/tcp_send_unbuffered.c
+++ b/net/tcp/tcp_send_unbuffered.c
@@ -67,7 +67,6 @@
 #  define NEED_IPDOMAIN_SUPPORT 1
 #endif
 
-
 #define TCPIPv4BUF ((struct tcp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev) + IPv4_HDRLEN])
 #define TCPIPv6BUF ((struct tcp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev) + IPv6_HDRLEN])
 
@@ -243,7 +242,6 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
 
       pstate->snd_sent = pstate->snd_acked;
 
-
       /* Fall through to re-send data from the last that was ACKed */
     }
 
@@ -301,7 +299,6 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
 
       uint32_t sndlen = pstate->snd_buflen - pstate->snd_sent;
 
-
       if (sndlen > conn->mss)
         {
           sndlen = conn->mss;

[incubator-nuttx] 01/04: tcp_send_unbuffered.c: unifdef -UCONFIG_NET_TCP_SPLIT

Posted by xi...@apache.org.
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 1550a525e9659ef6b504b17675f6b0c1227dd36b
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Oct 13 10:47:03 2021 +0900

    tcp_send_unbuffered.c: unifdef -UCONFIG_NET_TCP_SPLIT
---
 net/tcp/tcp_send_unbuffered.c | 93 -------------------------------------------
 1 file changed, 93 deletions(-)

diff --git a/net/tcp/tcp_send_unbuffered.c b/net/tcp/tcp_send_unbuffered.c
index d487318..359da8c 100644
--- a/net/tcp/tcp_send_unbuffered.c
+++ b/net/tcp/tcp_send_unbuffered.c
@@ -67,9 +67,6 @@
 #  define NEED_IPDOMAIN_SUPPORT 1
 #endif
 
-#if defined(CONFIG_NET_TCP_SPLIT) && !defined(CONFIG_NET_TCP_SPLIT_SIZE)
-#  define CONFIG_NET_TCP_SPLIT_SIZE 40
-#endif
 
 #define TCPIPv4BUF ((struct tcp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev) + IPv4_HDRLEN])
 #define TCPIPv6BUF ((struct tcp_hdr_s *)&dev->d_buf[NET_LL_HDRLEN(dev) + IPv6_HDRLEN])
@@ -92,9 +89,6 @@ struct send_s
   ssize_t                 snd_sent;    /* The number of bytes sent */
   uint32_t                snd_isn;     /* Initial sequence number */
   uint32_t                snd_acked;   /* The number of bytes acked */
-#if defined(CONFIG_NET_TCP_SPLIT)
-  bool                    snd_odd;     /* True: Odd packet in pair transaction */
-#endif
 };
 
 /****************************************************************************
@@ -249,13 +243,6 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
 
       pstate->snd_sent = pstate->snd_acked;
 
-#if defined(CONFIG_NET_TCP_SPLIT)
-      /* Reset the even/odd indicator to even since we need to
-       * retransmit.
-       */
-
-      pstate->snd_odd = false;
-#endif
 
       /* Fall through to re-send data from the last that was ACKed */
     }
@@ -314,86 +301,6 @@ static uint16_t tcpsend_eventhandler(FAR struct net_driver_s *dev,
 
       uint32_t sndlen = pstate->snd_buflen - pstate->snd_sent;
 
-#if defined(CONFIG_NET_TCP_SPLIT)
-
-      /* RFC 1122 states that a host may delay ACKing for up to 500ms but
-       * must respond to every second  segment).  This logic here will trick
-       * the RFC 1122 recipient into responding sooner.  This logic will be
-       * activated if:
-       *
-       *   1. An even number of packets has been send (where zero is an even
-       *      number),
-       *   2. There is more data be sent (more than or equal to
-       *      CONFIG_NET_TCP_SPLIT_SIZE), but
-       *   3. Not enough data for two packets.
-       *
-       * Then we will split the remaining, single packet into two partial
-       * packets.  This will stimulate the RFC 1122 peer to ACK sooner.
-       *
-       * Don't try to split very small packets (less than
-       * CONFIG_NET_TCP_SPLIT_SIZE).  Only the first even packet and the
-       * last odd packets could have sndlen less than
-       * CONFIG_NET_TCP_SPLIT_SIZE.  The value of sndlen on the last even
-       * packet is guaranteed to be at least MSS / 2 by the logic below.
-       */
-
-      if (sndlen >= CONFIG_NET_TCP_SPLIT_SIZE)
-        {
-          /* sndlen is the number of bytes remaining to be sent.
-           * conn->mss will provide the number of bytes that can sent
-           * in one packet.  The difference, then, is the number of bytes
-           * that would be sent in the next packet after this one.
-           */
-
-          int32_t next_sndlen = sndlen - conn->mss;
-
-          /*  Is this the even packet in the packet pair transaction? */
-
-          if (!pstate->snd_odd)
-            {
-              /* next_sndlen <= 0 means that the entire remaining data
-               * could fit into this single packet.  This is condition
-               * in which we must do the split.
-               */
-
-              if (next_sndlen <= 0)
-                {
-                  /* Split so that there will be an odd packet.  Here
-                   * we know that 0 < sndlen <= MSS
-                   */
-
-                  sndlen = (sndlen / 2) + 1;
-                }
-            }
-
-          /* No... this is the odd packet in the packet pair transaction */
-
-          else
-            {
-              /* Will there be another (even) packet after this one?
-               * (next_sndlen > 0)  Will the split condition occur on that
-               * next, even packet? ((next_sndlen - conn->mss) < 0) If
-               * so, then perform the split now to avoid the case where the
-               * byte count is less than CONFIG_NET_TCP_SPLIT_SIZE on the
-               * next pair.
-               */
-
-              if (next_sndlen > 0 && (next_sndlen - conn->mss) < 0)
-                {
-                  /* Here, we know that sndlen must be MSS < sndlen <= 2*MSS
-                   * and so (sndlen / 2) is <= MSS.
-                   */
-
-                  sndlen /= 2;
-                }
-            }
-        }
-
-      /* Toggle the even/odd indicator */
-
-      pstate->snd_odd ^= true;
-
-#endif /* CONFIG_NET_TCP_SPLIT */
 
       if (sndlen > conn->mss)
         {

[incubator-nuttx] 03/04: net/tcp/Kconfig: Remove NET_TCP_SPLIT

Posted by xi...@apache.org.
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 ecd6a3572b21fee1d9a69e930ecbf10e12f79d05
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Oct 13 10:49:45 2021 +0900

    net/tcp/Kconfig: Remove NET_TCP_SPLIT
    
    While it's a neat idea, it doesn't work well in reality.
    
    * Many of modern tcp stacks don't obey the "ack every other packet"
      rule these days. (Linux, macOS, ...)
    
    * Even if a traditional TCP implementation is assumed, we can't
      predict/control which packets are acked reliably. For example,
      window updates can easily mess up our strategy.
---
 net/tcp/Kconfig | 28 ----------------------------
 1 file changed, 28 deletions(-)

diff --git a/net/tcp/Kconfig b/net/tcp/Kconfig
index e53ee05..d41368b 100644
--- a/net/tcp/Kconfig
+++ b/net/tcp/Kconfig
@@ -203,34 +203,6 @@ config NET_TCPBACKLOG_CONNS
 
 endif # NET_TCPBACKLOG
 
-config NET_TCP_SPLIT
-	bool "Enable packet splitting"
-	default n
-	depends on !NET_TCP_WRITE_BUFFERS
-	---help---
-		send() will not return until the transfer has been ACKed by the
-		recipient.  But under RFC 1122, the host need not ACK each packet
-		immediately; the host may wait for 500 MS before ACKing.  This
-		combination can cause very slow performance with small transfers are
-		made to an RFC 1122 client.  However, the RFC 1122 must ACK at least
-		every second (odd) packet.
-
-		This option enables logic to trick the RFC 1122 host be exploiting
-		this last RFC 1122 requirement:  If an odd number of packets were to
-		be sent, then send() will split the last even packet to guarantee
-		that an even number of packets will be sent and the RFC 1122 host
-		will ACK the final packet immediately.
-
-if NET_TCP_SPLIT
-
-config NET_TCP_SPLIT_SIZE
-	int "Split size threshold"
-	default 40
-	---help---
-		Packets of this size or smaller than this will not be split.
-
-endif # NET_TCP_SPLIT
-
 config NET_SENDFILE
 	bool "Optimized network sendfile()"
 	default n

[incubator-nuttx] 04/04: Refresh configs after the removal of NET_TCP_SPLIT

Posted by xi...@apache.org.
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 37141bb5e87cd30ece1e468244ddef95aac63e65
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Oct 13 10:57:12 2021 +0900

    Refresh configs after the removal of NET_TCP_SPLIT
---
 boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig | 1 -
 boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig      | 1 -
 boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig   | 1 -
 boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig          | 1 -
 boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig      | 1 -
 boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig            | 1 -
 6 files changed, 6 deletions(-)

diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig
index 4bd984b..4f76a60 100644
--- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig
+++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/hidmouse/defconfig
@@ -43,7 +43,6 @@ CONFIG_NET_ICMP=y
 CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_MAX_LISTENPORTS=8
 CONFIG_NET_TCP=y
-CONFIG_NET_TCP_SPLIT=y
 CONFIG_NET_UDP=y
 CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_ARCHINIT=y
diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig
index 62f35a6..d2a546f 100644
--- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig
+++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/nsh/defconfig
@@ -52,7 +52,6 @@ CONFIG_NET_ICMP=y
 CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_MAX_LISTENPORTS=8
 CONFIG_NET_TCP=y
-CONFIG_NET_TCP_SPLIT=y
 CONFIG_NET_UDP=y
 CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_ARCHINIT=y
diff --git a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig
index 2257c90..5dbbf29 100644
--- a/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig
+++ b/boards/arm/lpc17xx_40xx/olimex-lpc1766stk/configs/zmodem/defconfig
@@ -49,7 +49,6 @@ CONFIG_NET_ICMP=y
 CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_MAX_LISTENPORTS=8
 CONFIG_NET_TCP=y
-CONFIG_NET_TCP_SPLIT=y
 CONFIG_NET_UDP=y
 CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_ARCHINIT=y
diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig
index 97c91f7..141c68a 100644
--- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig
+++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nsh/defconfig
@@ -52,7 +52,6 @@ CONFIG_NET_ICMP=y
 CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_MAX_LISTENPORTS=8
 CONFIG_NET_TCP=y
-CONFIG_NET_TCP_SPLIT=y
 CONFIG_NET_UDP=y
 CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_ARCHINIT=y
diff --git a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig
index 819d487..9fb12c3 100644
--- a/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig
+++ b/boards/arm/lpc17xx_40xx/zkit-arm-1769/configs/nxhello/defconfig
@@ -60,7 +60,6 @@ CONFIG_NET_ICMP=y
 CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_MAX_LISTENPORTS=8
 CONFIG_NET_TCP=y
-CONFIG_NET_TCP_SPLIT=y
 CONFIG_NET_UDP=y
 CONFIG_NET_UDP_CHECKSUMS=y
 CONFIG_NSH_ARCHINIT=y
diff --git a/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig b/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig
index 58b16bc..98ab44c 100644
--- a/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig
+++ b/boards/arm/stm32/stm32butterfly2/configs/nshnet/defconfig
@@ -50,7 +50,6 @@ CONFIG_NET_ICMP=y
 CONFIG_NET_ICMP_SOCKET=y
 CONFIG_NET_LOCAL=y
 CONFIG_NET_TCP=y
-CONFIG_NET_TCP_SPLIT=y
 CONFIG_NET_UDP=y
 CONFIG_NSH_ARCHINIT=y
 CONFIG_NSH_BUILTIN_APPS=y