You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/01/11 14:24:56 UTC

[incubator-nuttx] 01/03: Make the read ahead buffer unselectable

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

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

commit 346336bb9e5c9199b82e34d08bf23dd1bc389460
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Jan 11 11:56:03 2020 +0800

    Make the read ahead buffer unselectable
    
    Here is the email loop talk about why it is better to remove the option:
    https://groups.google.com/forum/#!topic/nuttx/AaNkS7oU6R0
    
    Change-Id: Ib66c037752149ad4b2787ef447f966c77aa12aad
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 Documentation/NuttxPortingGuide.html               |   4 +-
 Documentation/NuttxUserGuide.html                  |   2 -
 boards/arm/kinetis/freedom-k64f/README.txt         |   2 -
 boards/arm/kinetis/freedom-k66f/README.txt         |   2 -
 boards/arm/kinetis/twr-k64f120m/README.txt         |   2 -
 boards/arm/sam34/sam4e-ek/README.txt               |   1 -
 boards/arm/sama5/sama5d3-xplained/README.txt       |   1 -
 .../sama5d3-xplained/configs/bridge/defconfig      |   1 -
 boards/arm/sama5/sama5d3x-ek/README.txt            |   1 -
 boards/arm/sama5/sama5d4-ek/README.txt             |   1 -
 .../arm/sama5/sama5d4-ek/configs/bridge/defconfig  |   1 -
 boards/arm/samv7/same70-xplained/README.txt        |   1 -
 boards/arm/samv7/samv71-xult/README.txt            |   1 -
 boards/arm/stm32/cloudctrl/configs/nsh/defconfig   |   1 -
 .../stm32/olimex-stm32-p207/configs/nsh/defconfig  |   1 -
 boards/arm/stm32/viewtool-stm32f107/README.txt     |   2 -
 boards/arm/tiva/dk-tm4c129x/README.txt             |   2 -
 boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig |   1 -
 boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig |   1 -
 fs/procfs/fs_procfsiobinfo.c                       |   4 +-
 graphics/vnc/server/Kconfig                        |   1 -
 graphics/vnc/server/vnc_server.h                   |   4 -
 include/nuttx/mm/iob.h                             |   4 +-
 include/nuttx/net/netconfig.h                      |  14 ---
 mm/iob/Kconfig                                     |   8 +-
 net/Kconfig                                        |   2 +
 net/inet/inet_recvfrom.c                           | 130 +++------------------
 net/inet/inet_sockif.c                             |  16 ---
 net/tcp/Kconfig                                    |  35 +-----
 net/tcp/tcp.h                                      |   6 +-
 net/tcp/tcp_callback.c                             |   6 -
 net/tcp/tcp_conn.c                                 |   6 -
 net/tcp/tcp_netpoll.c                              |   6 -
 net/tcp/tcp_notifier.c                             |   6 -
 net/tcp/tcp_recvwindow.c                           |   8 +-
 net/udp/Kconfig                                    |   8 +-
 net/udp/udp.h                                      |   9 +-
 net/udp/udp_callback.c                             |   6 -
 net/udp/udp_conn.c                                 |   2 -
 net/udp/udp_netpoll.c                              |   2 -
 net/udp/udp_notifier.c                             |   6 -
 41 files changed, 35 insertions(+), 282 deletions(-)

diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html
index 5e5b932..c51d9cb 100644
--- a/Documentation/NuttxPortingGuide.html
+++ b/Documentation/NuttxPortingGuide.html
@@ -4600,7 +4600,7 @@ This objectives of this feature are:
   <dt><code>CONFIG_IOB_NBUFFERS</code>
   <dd>Number of pre-allocated I/O buffers.  Each packet is represented by a series of small I/O buffers in a chain.  This setting determines the number of preallocated I/O buffers available for packet data.
 
-  The default value is setup for network support.  The default is 8 buffers if neither TCP read-ahead or TCP write buffering is enabled (neither <code>CONFIG_NET_TCP_WRITE_BUFFERS</code> nor <code>CONFIG_NET_TCP_READAHEAD</code>), 24 if only write buffering is enabled, and 36 if both read-ahead and write buffering are enabled.
+  The default value is setup for network support.  The default is 8 buffers if neither TCP/UDP or write buffering is enabled (neither <code>CONFIG_NET_TCP_WRITE_BUFFERS</code> nor <code>CONFIG_NET_TCP</code>), 24 if only TCP/UDP is enabled, and 36 if both TCP/UDP and write buffering are enabled.
 
   <dt><code>CONFIG_IOB_BUFSIZE</code>
   <dd>Payload size of one I/O buffer.  Each packet is represented by a series of small I/O buffers in a chain.  This setting determines the data payload each preallocated I/O buffer.  The default value is 196 bytes.
@@ -4610,7 +4610,7 @@ This objectives of this feature are:
 
   <dd>These generic I/O buffer chain containers are not currently used by any logic in NuttX.  That is because their other other specialized I/O buffer chain containers that also carry a payload of usage specific information.
 
-  The default value is zero if nether TCP nor UDP read-ahead buffering is enabled (i.e., neither <code>CONFIG_NET_TCP_READAHEAD</code> && !<code>CONFIG_NET_UDP_READAHEAD</code> or eight if either is enabled.
+  The default value is zero if nether TCP nor UDP is enabled (i.e., neither <code>CONFIG_NET_TCP</code> && !<code>CONFIG_NET_UDP</code> or eight if either is enabled.
 
   <dt><code>CONFIG_IOB_THROTTLE</code>
   <dd>I/O buffer throttle value.  TCP write buffering and read-ahead buffer use the same pool of free I/O buffers.  In order to prevent uncontrolled incoming TCP packets from hogging all of the available, pre-allocated I/O buffers, a throttling value is required.  This throttle value assures that I/O buffers will be denied to the read-ahead logic before TCP writes are halted.
diff --git a/Documentation/NuttxUserGuide.html b/Documentation/NuttxUserGuide.html
index 064977d..67c5012 100644
--- a/Documentation/NuttxUserGuide.html
+++ b/Documentation/NuttxUserGuide.html
@@ -8639,8 +8639,6 @@ interface of the same name.
 <ul>
   <li><code>CONFIG_NET</code> Defined for general network support</li>
   <li><code>CONFIG_NET_TCP</code> Defined for TCP/IP support</li>
-  <li><code>CONFIG_NET_TCP_READAHEAD</code> Define to enable read-ahead buffering</li>
-  <li><code>CONFIG_NET_NTCP_READAHEAD_BUFFERS</code> Defined to be greater than zero</li>
 </ul>
 <p>
   In order to for select to work with incoming connections, you must also select:
diff --git a/boards/arm/kinetis/freedom-k64f/README.txt b/boards/arm/kinetis/freedom-k64f/README.txt
index 49b2081..5ef51ab 100644
--- a/boards/arm/kinetis/freedom-k64f/README.txt
+++ b/boards/arm/kinetis/freedom-k64f/README.txt
@@ -200,11 +200,9 @@ Networking Support
     CONFIG_NET_ARP_IPIN=y               : Enable ARP address harvesting
     CONFIG_NET_ARP_SEND=y               : Send ARP request before sending data
     CONFIG_NET_TCP=y                    : Enable TCP/IP networking
-    CONFIG_NET_TCP_READAHEAD=y          : Support TCP read-ahead
     CONFIG_NET_TCP_WRITE_BUFFERS=y      : Support TCP write-buffering
     CONFIG_NET_TCPBACKLOG=y             : Support TCP/IP backlog
     CONFIG_NET_MAX_LISTENPORTS=20       :
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=536  Read-ahead buffer size
     CONFIG_NET_UDP=y                    : Enable UDP networking
     CONFIG_NET_BROADCAST=y              : Needed for DNS name resolution
     CONFIG_NET_ICMP=y                   : Enable ICMP networking
diff --git a/boards/arm/kinetis/freedom-k66f/README.txt b/boards/arm/kinetis/freedom-k66f/README.txt
index 7c5cc5b..1d2db56 100644
--- a/boards/arm/kinetis/freedom-k66f/README.txt
+++ b/boards/arm/kinetis/freedom-k66f/README.txt
@@ -203,11 +203,9 @@ Networking Support
     CONFIG_NET_ARP_IPIN=y               : Enable ARP address harvesting
     CONFIG_NET_ARP_SEND=y               : Send ARP request before sending data
     CONFIG_NET_TCP=y                    : Enable TCP/IP networking
-    CONFIG_NET_TCP_READAHEAD=y          : Support TCP read-ahead
     CONFIG_NET_TCP_WRITE_BUFFERS=y      : Support TCP write-buffering
     CONFIG_NET_TCPBACKLOG=y             : Support TCP/IP backlog
     CONFIG_NET_MAX_LISTENPORTS=20       :
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=536  Read-ahead buffer size
     CONFIG_NET_UDP=y                    : Enable UDP networking
     CONFIG_NET_BROADCAST=y              : Needed for DNS name resolution
     CONFIG_NET_ICMP=y                   : Enable ICMP networking
diff --git a/boards/arm/kinetis/twr-k64f120m/README.txt b/boards/arm/kinetis/twr-k64f120m/README.txt
index 5898395..a0221b9 100644
--- a/boards/arm/kinetis/twr-k64f120m/README.txt
+++ b/boards/arm/kinetis/twr-k64f120m/README.txt
@@ -178,11 +178,9 @@ Networking Support
     CONFIG_NET_ARP_IPIN=y               : Enable ARP address harvesting
     CONFIG_NET_ARP_SEND=y               : Send ARP request before sending data
     CONFIG_NET_TCP=y                    : Enable TCP/IP networking
-    CONFIG_NET_TCP_READAHEAD=y          : Support TCP read-ahead
     CONFIG_NET_TCP_WRITE_BUFFERS=y      : Support TCP write-buffering
     CONFIG_NET_TCPBACKLOG=y             : Support TCP/IP backlog
     CONFIG_NET_MAX_LISTENPORTS=20       :
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=536  Read-ahead buffer size
     CONFIG_NET_UDP=y                    : Enable UDP networking
     CONFIG_NET_BROADCAST=y              : Needed for DNS name resolution
     CONFIG_NET_ICMP=y                   : Enable ICMP networking
diff --git a/boards/arm/sam34/sam4e-ek/README.txt b/boards/arm/sam34/sam4e-ek/README.txt
index c78b42f..404237b 100644
--- a/boards/arm/sam34/sam4e-ek/README.txt
+++ b/boards/arm/sam34/sam4e-ek/README.txt
@@ -226,7 +226,6 @@ Networking Support
     CONFIG_NET_ETH_PKTSIZE=562          : Maximum packet size 1518 is more standard
     CONFIG_NET_TCP=y                    : Enable TCP/IP networking
     CONFIG_NET_TCPBACKLOG=y             : Support TCP/IP backlog
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=536  Read-ahead buffer size
     CONFIG_NET_UDP=y                    : Enable UDP networking
     CONFIG_NET_BROADCAST=y              : Needed for DNS name resolution
     CONFIG_NET_ICMP=y                   : Enable ICMP networking
diff --git a/boards/arm/sama5/sama5d3-xplained/README.txt b/boards/arm/sama5/sama5d3-xplained/README.txt
index 1273b4a..a2611b2 100644
--- a/boards/arm/sama5/sama5d3-xplained/README.txt
+++ b/boards/arm/sama5/sama5d3-xplained/README.txt
@@ -843,7 +843,6 @@ Networking
     CONFIG_NET_ETH_PKTSIZE=562           : Maximum packet size 1518 is more standard
     CONFIG_NET_TCP=y                     : Enable TCP/IP networking
     CONFIG_NET_TCPBACKLOG=y              : Support TCP/IP backlog
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 : Read-ahead buffer size
     CONFIG_NET_UDP=y                     : Enable UDP networking
     CONFIG_NET_ICMP=y                    : Enable ICMP networking
     CONFIG_NET_ICMP_SOCKET=y             : Needed for NSH ping command
diff --git a/boards/arm/sama5/sama5d3-xplained/configs/bridge/defconfig b/boards/arm/sama5/sama5d3-xplained/configs/bridge/defconfig
index f0116cd..f0dfc93 100644
--- a/boards/arm/sama5/sama5d3-xplained/configs/bridge/defconfig
+++ b/boards/arm/sama5/sama5d3-xplained/configs/bridge/defconfig
@@ -5,7 +5,6 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that includes your
 # modifications.
 #
-# CONFIG_NET_UDP_READAHEAD is not set
 # CONFIG_SAMA5_ISRAM_HEAP is not set
 # CONFIG_SAMA5_UART0 is not set
 CONFIG_ARCH="arm"
diff --git a/boards/arm/sama5/sama5d3x-ek/README.txt b/boards/arm/sama5/sama5d3x-ek/README.txt
index 4ebddbe..b67e2fa 100644
--- a/boards/arm/sama5/sama5d3x-ek/README.txt
+++ b/boards/arm/sama5/sama5d3x-ek/README.txt
@@ -983,7 +983,6 @@ Networking
     CONFIG_NET_ETH_PKTSIZE=562           : Maximum packet size 1518 is more standard
     CONFIG_NET_TCP=y                     : Enable TCP/IP networking
     CONFIG_NET_TCPBACKLOG=y              : Support TCP/IP backlog
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=562 : Read-ahead buffer size
     CONFIG_NET_UDP=y                     : Enable UDP networking
     CONFIG_NET_ICMP=y                    : Enable ICMP networking
     CONFIG_NET_ICMP_SOCKET=y             : Needed for NSH ping command
diff --git a/boards/arm/sama5/sama5d4-ek/README.txt b/boards/arm/sama5/sama5d4-ek/README.txt
index 2ac5207..0056998 100644
--- a/boards/arm/sama5/sama5d4-ek/README.txt
+++ b/boards/arm/sama5/sama5d4-ek/README.txt
@@ -1344,7 +1344,6 @@ Networking
     CONFIG_NET_ARP_IPIN=y                : IP address harvesting (optional)
     CONFIG_NET_TCP=y                     : Enable TCP/IP networking
     CONFIG_NET_TCPBACKLOG=y              : Support TCP/IP backlog
-    CONFIG_NET_TCP_READAHEAD=y           : Enable TCP read-ahead buffering
     CONFIG_NET_TCP_WRITE_BUFFERS=y       : Enable TCP write buffering
     CONFIG_NET_UDP=y                     : Enable UDP networking
     CONFIG_NET_BROADCAST=y               : Support UDP broadcast packets
diff --git a/boards/arm/sama5/sama5d4-ek/configs/bridge/defconfig b/boards/arm/sama5/sama5d4-ek/configs/bridge/defconfig
index c31d0c7..0fddd31 100644
--- a/boards/arm/sama5/sama5d4-ek/configs/bridge/defconfig
+++ b/boards/arm/sama5/sama5d4-ek/configs/bridge/defconfig
@@ -5,7 +5,6 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that includes your
 # modifications.
 #
-# CONFIG_NET_UDP_READAHEAD is not set
 # CONFIG_SAMA5_ISRAM_HEAP is not set
 # CONFIG_SAMA5_UART0 is not set
 CONFIG_ARCH="arm"
diff --git a/boards/arm/samv7/same70-xplained/README.txt b/boards/arm/samv7/same70-xplained/README.txt
index 2a952b4..5530291 100644
--- a/boards/arm/samv7/same70-xplained/README.txt
+++ b/boards/arm/samv7/same70-xplained/README.txt
@@ -395,7 +395,6 @@ Selecting the GMAC peripheral
     CONFIG_NET_ARP_SEND=y                : Use ARP to get peer address before sending
     CONFIG_NET_TCP=y                     : Enable TCP/IP networking
     CONFIG_NET_TCPBACKLOG=y              : Support TCP/IP backlog
-    CONFIG_NET_TCP_READAHEAD=y           : Enable TCP read-ahead buffering
     CONFIG_NET_TCP_WRITE_BUFFERS=y       : Enable TCP write buffering
     CONFIG_NET_UDP=y                     : Enable UDP networking
     CONFIG_NET_BROADCAST=y               : Support UDP broadcast packets
diff --git a/boards/arm/samv7/samv71-xult/README.txt b/boards/arm/samv7/samv71-xult/README.txt
index 68125b6..8b09a6d 100644
--- a/boards/arm/samv7/samv71-xult/README.txt
+++ b/boards/arm/samv7/samv71-xult/README.txt
@@ -711,7 +711,6 @@ Selecting the GMAC peripheral
     CONFIG_NET_ARP_SEND=y                : Use ARP to get peer address before sending
     CONFIG_NET_TCP=y                     : Enable TCP/IP networking
     CONFIG_NET_TCPBACKLOG=y              : Support TCP/IP backlog
-    CONFIG_NET_TCP_READAHEAD=y           : Enable TCP read-ahead buffering
     CONFIG_NET_TCP_WRITE_BUFFERS=y       : Enable TCP write buffering
     CONFIG_NET_UDP=y                     : Enable UDP networking
     CONFIG_NET_BROADCAST=y               : Support UDP broadcast packets
diff --git a/boards/arm/stm32/cloudctrl/configs/nsh/defconfig b/boards/arm/stm32/cloudctrl/configs/nsh/defconfig
index 822fbdc..48fabb2 100644
--- a/boards/arm/stm32/cloudctrl/configs/nsh/defconfig
+++ b/boards/arm/stm32/cloudctrl/configs/nsh/defconfig
@@ -5,7 +5,6 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that includes your
 # modifications.
 #
-# CONFIG_NET_UDP_READAHEAD is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
 # CONFIG_SPI_CALLBACK is not set
diff --git a/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig b/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig
index 52c54cc..0199fe6 100644
--- a/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig
+++ b/boards/arm/stm32/olimex-stm32-p207/configs/nsh/defconfig
@@ -5,7 +5,6 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that includes your
 # modifications.
 #
-# CONFIG_NET_UDP_READAHEAD is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
 CONFIG_ADC=y
diff --git a/boards/arm/stm32/viewtool-stm32f107/README.txt b/boards/arm/stm32/viewtool-stm32f107/README.txt
index 2f38ea7..e1f5bda 100644
--- a/boards/arm/stm32/viewtool-stm32f107/README.txt
+++ b/boards/arm/stm32/viewtool-stm32f107/README.txt
@@ -374,8 +374,6 @@ ViewTool DP83848 Ethernet Module
       CONFIG_NET_SOCKOPTS=y
 
       CONFIG_NET_ETH_PKTSIZE=650             : Maximum packet size
-      CONFIG_NET_TCP_READAHEAD=y             : Enable read-ahead buffering
-      CONFIG_NET_TCP_READAHEAD_BUFSIZE=650
 
       CONFIG_NET_TCP=y                       : TCP support
       CONFIG_NET_NTCP_READAHEAD_BUFFERS=8
diff --git a/boards/arm/tiva/dk-tm4c129x/README.txt b/boards/arm/tiva/dk-tm4c129x/README.txt
index f178456..a167b41 100644
--- a/boards/arm/tiva/dk-tm4c129x/README.txt
+++ b/boards/arm/tiva/dk-tm4c129x/README.txt
@@ -232,11 +232,9 @@ Networking Support
     CONFIG_NET_ARP_IPIN=y               : Enable ARP address harvesting
     CONFIG_NET_ARP_SEND=y               : Send ARP request before sending data
     CONFIG_NET_TCP=y                    : Enable TCP/IP networking
-    CONFIG_NET_TCP_READAHEAD=y          : Support TCP read-ahead
     CONFIG_NET_TCP_WRITE_BUFFERS=y      : Support TCP write-buffering
     CONFIG_NET_TCPBACKLOG=y             : Support TCP/IP backlog
     CONFIG_NET_MAX_LISTENPORTS=20       :
-    CONFIG_NET_TCP_READAHEAD_BUFSIZE=536  Read-ahead buffer size
     CONFIG_NET_UDP=y                    : Enable UDP networking
     CONFIG_NET_BROADCAST=y              : Needed for DNS name resolution
     CONFIG_NET_ICMP=y                   : Enable ICMP networking
diff --git a/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig b/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig
index 1a2c6d0..50e031e 100644
--- a/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig
+++ b/boards/arm/tiva/dk-tm4c129x/configs/ipv6/defconfig
@@ -7,7 +7,6 @@
 #
 # CONFIG_ARCH_FPU is not set
 # CONFIG_NET_IPv4 is not set
-# CONFIG_NET_UDP_READAHEAD is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
 CONFIG_ARCH="arm"
diff --git a/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig b/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig
index e1d18e2..f7fd6e4 100644
--- a/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig
+++ b/boards/arm/tiva/lm3s6432-s2e/configs/nsh/defconfig
@@ -5,7 +5,6 @@
 # You can then do "make savedefconfig" to generate a new defconfig file that includes your
 # modifications.
 #
-# CONFIG_NET_UDP_READAHEAD is not set
 # CONFIG_NSH_DISABLE_IFCONFIG is not set
 # CONFIG_NSH_DISABLE_PS is not set
 CONFIG_ARCH="arm"
diff --git a/fs/procfs/fs_procfsiobinfo.c b/fs/procfs/fs_procfsiobinfo.c
index 1ddfb8e..44e7486 100644
--- a/fs/procfs/fs_procfsiobinfo.c
+++ b/fs/procfs/fs_procfsiobinfo.c
@@ -136,13 +136,13 @@ static FAR const char *g_iob_user_names[] =
 #ifdef CONFIG_NET_BLUETOOTH
   "bluetooth_sock",
 #endif
-#ifdef CONFIG_NET_UDP_READAHEAD
+#if defined(CONFIG_NET_UDP) && !defined(NET_UDP_NO_STACK)
   "udp_readahead",
 #endif
 #ifdef CONFIG_NET_UDP_WRITE_BUFFERS
   "udp_writebuffer",
 #endif
-#ifdef CONFIG_NET_TCP_READAHEAD
+#if defined(CONFIG_NET_TCP) && !defined(NET_TCP_NO_STACK)
   "tcp_readahead",
 #endif
 #ifdef CONFIG_NET_TCP_WRITE_BUFFERS
diff --git a/graphics/vnc/server/Kconfig b/graphics/vnc/server/Kconfig
index cf7fca2..c0158a3 100644
--- a/graphics/vnc/server/Kconfig
+++ b/graphics/vnc/server/Kconfig
@@ -7,7 +7,6 @@ menuconfig VNCSERVER
 	bool "VNC server"
 	default n
 	depends on NET_TCP && !NX_LCDDRIVER
-	select NET_TCP_READAHEAD
 	select NX_UPDATE
 	---help---
 		Enable support for a VNC Remote Frame Buffer (RFB) server.
diff --git a/graphics/vnc/server/vnc_server.h b/graphics/vnc/server/vnc_server.h
index 04f41c2..6bfc686 100644
--- a/graphics/vnc/server/vnc_server.h
+++ b/graphics/vnc/server/vnc_server.h
@@ -60,10 +60,6 @@
 
 /* Configuration */
 
-#ifndef CONFIG_NET_TCP_READAHEAD
-#  error CONFIG_NET_TCP_READAHEAD must be set to use VNC
-#endif
-
 #ifndef CONFIG_NX_UPDATE
 #  error CONFIG_NX_UPDATE must be set to use VNC
 #endif
diff --git a/include/nuttx/mm/iob.h b/include/nuttx/mm/iob.h
index ab2ee37..43cceea 100644
--- a/include/nuttx/mm/iob.h
+++ b/include/nuttx/mm/iob.h
@@ -187,13 +187,13 @@ enum iob_user_e
 #ifdef CONFIG_NET_BLUETOOTH
   IOBUSER_NET_SOCK_BLUETOOTH,
 #endif
-#ifdef CONFIG_NET_UDP_READAHEAD
+#if defined(CONFIG_NET_UDP) && !defined(NET_UDP_NO_STACK)
   IOBUSER_NET_UDP_READAHEAD,
 #endif
 #ifdef CONFIG_NET_UDP_WRITE_BUFFERS
   IOBUSER_NET_UDP_WRITEBUFFER,
 #endif
-#ifdef CONFIG_NET_TCP_READAHEAD
+#if defined(CONFIG_NET_TCP) && !defined(NET_TCP_NO_STACK)
   IOBUSER_NET_TCP_READAHEAD,
 #endif
 #ifdef CONFIG_NET_TCP_WRITE_BUFFERS
diff --git a/include/nuttx/net/netconfig.h b/include/nuttx/net/netconfig.h
index 69c713c..780290f 100644
--- a/include/nuttx/net/netconfig.h
+++ b/include/nuttx/net/netconfig.h
@@ -587,20 +587,6 @@
 #  endif
 #endif
 
-/* General configuration options */
-
-/* Delay after receive to catch a following packet.  No delay should be
- * required if TCP/IP read-ahead buffering is enabled.
- */
-
-#ifndef CONFIG_NET_TCP_RECVDELAY
-#  ifdef CONFIG_NET_TCP_READAHEAD
-#    define CONFIG_NET_TCP_RECVDELAY 0
-#  else
-#    define CONFIG_NET_TCP_RECVDELAY 5
-#  endif
-#endif
-
 /****************************************************************************
  * Public Type Definitions
  ****************************************************************************/
diff --git a/mm/iob/Kconfig b/mm/iob/Kconfig
index b7f72cd..95a4376 100644
--- a/mm/iob/Kconfig
+++ b/mm/iob/Kconfig
@@ -16,8 +16,8 @@ if MM_IOB
 
 config IOB_NBUFFERS
 	int "Number of pre-allocated I/O buffers"
-	default 24 if (NET_WRITE_BUFFERS && !NET_READAHEAD) || (!NET_WRITE_BUFFERS && NET_READAHEAD)
-	default 36 if NET_WRITE_BUFFERS && NET_READAHEAD
+	default 36 if NET_WRITE_BUFFERS
+	default 24 if !NET_WRITE_BUFFERS && NET_READAHEAD
 	default 8 if !NET_WRITE_BUFFERS && !NET_READAHEAD
 	---help---
 		Each packet is represented by a series of small I/O buffers in a
@@ -34,8 +34,8 @@ config IOB_BUFSIZE
 
 config IOB_NCHAINS
 	int "Number of pre-allocated I/O buffer chain heads"
-	default 0 if !NET_READAHEAD && !NET_UDP_READAHEAD
-	default IOB_NBUFFERS if NET_READAHEAD || NET_UDP_READAHEAD
+	default 0 if !NET_READAHEAD
+	default IOB_NBUFFERS if NET_READAHEAD
 	---help---
 		These tiny nodes are used as "containers" to support queueing of
 		I/O buffer chains.  This will limit the number of I/O transactions
diff --git a/net/Kconfig b/net/Kconfig
index d100886..4c8d0dc 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -14,10 +14,12 @@ config ARCH_HAVE_PHY
 config NET_WRITE_BUFFERS
 	bool
 	default n
+	select MM_IOB
 
 config NET_READAHEAD
 	bool
 	default n
+	select MM_IOB
 
 config NET_MCASTGROUP
 	bool
diff --git a/net/inet/inet_recvfrom.c b/net/inet/inet_recvfrom.c
index e4edc5c..458fab2 100644
--- a/net/inet/inet_recvfrom.c
+++ b/net/inet/inet_recvfrom.c
@@ -223,7 +223,6 @@ static inline void inet_tcp_newdata(FAR struct net_driver_s *dev,
 
   if (recvlen < dev->d_len)
     {
-#ifdef CONFIG_NET_TCP_READAHEAD
       FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)pstate->ir_sock->s_conn;
       FAR uint8_t *buffer = (FAR uint8_t *)dev->d_appdata + recvlen;
       uint16_t buflen = dev->d_len - recvlen;
@@ -252,9 +251,6 @@ static inline void inet_tcp_newdata(FAR struct net_driver_s *dev,
           nerr("ERROR: packet data not saved (%d bytes)\n", buflen - nsaved);
         }
 #endif
-#else
-      nerr("ERROR: packet data lost (%d bytes)\n", dev->d_len - recvlen);
-#endif
     }
 
   /* Indicate no data in the buffer */
@@ -312,7 +308,7 @@ static inline void inet_udp_newdata(FAR struct net_driver_s *dev,
  *
  ****************************************************************************/
 
-#if defined(NET_TCP_HAVE_STACK) && defined(CONFIG_NET_TCP_READAHEAD)
+#ifdef NET_TCP_HAVE_STACK
 static inline void inet_tcp_readahead(struct inet_recvfrom_s *pstate)
 {
   FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)pstate->ir_sock->s_conn;
@@ -373,9 +369,9 @@ static inline void inet_tcp_readahead(struct inet_recvfrom_s *pstate)
         }
     }
 }
-#endif /* NET_TCP_HAVE_STACK && CONFIG_NET_TCP_READAHEAD */
+#endif /* NET_TCP_HAVE_STACK */
 
-#if defined(NET_UDP_HAVE_STACK) && defined(CONFIG_NET_UDP_READAHEAD)
+#ifdef NET_UDP_HAVE_STACK
 
 static inline void inet_udp_readahead(struct inet_recvfrom_s *pstate)
 {
@@ -501,26 +497,6 @@ static int inet_recvfrom_timeout(struct inet_recvfrom_s *pstate)
       timeo = psock->s_rcvtimeo;
     }
 
-  /* Use a fixed, configurable delay under the following circumstances:
-   *
-   * 1) This delay function has been enabled with CONFIG_NET_TCP_RECVDELAY > 0
-   * 2) Some data has already been received from the socket.  Since this can
-   *    only be true for a TCP/IP socket, this logic applies only to TCP/IP
-   *    sockets.  And either
-   * 3) There is no configured receive timeout, or
-   * 4) The configured receive timeout is greater than than the delay
-   */
-
-#if CONFIG_NET_TCP_RECVDELAY > 0
-  if ((timeo == 0 || timeo > CONFIG_NET_TCP_RECVDELAY) &&
-      pstate->ir_recvlen > 0)
-    {
-      /* Use the configured timeout */
-
-      timeo = CONFIG_NET_TCP_RECVDELAY;
-    }
-#endif
-
   /* Is there an effective timeout? */
 
   if (timeo)
@@ -675,28 +651,14 @@ static uint16_t inet_tcp_eventhandler(FAR struct net_driver_s *dev,
 
           flags = (flags & ~TCP_NEWDATA) | TCP_SNDACK;
 
-          /* Check for transfer complete.  We will consider the transfer
-           * complete in own of two different ways, depending on the setting
-           * of CONFIG_NET_TCP_RECVDELAY.
-           *
-           * 1) If CONFIG_NET_TCP_RECVDELAY == 0 then we will consider the
-           *    TCP/IP transfer complete as soon as any data has been received.
-           *    This is safe because if any additional data is received, it
-           *    will be retained in the TCP/IP read-ahead buffer until the
-           *    next receive is performed.
-           * 2) CONFIG_NET_TCP_RECVDELAY > 0 may be set to wait a little
-           *    bit to determine if more data will be received.  You might
-           *    do this if read-ahead buffering is disabled and we want to
-           *    minimize the loss of back-to-back packets.  In this case,
-           *    the transfer is complete when either a) the entire user buffer
-           *    is full or 2) when the receive timeout occurs (below).
+          /* Check for transfer complete.  We will consider the
+           * TCP/IP transfer complete as soon as any data has been received.
+           * This is safe because if any additional data is received, it
+           * will be retained in the TCP/IP read-ahead buffer until the
+           * next receive is performed.
            */
 
-#if CONFIG_NET_TCP_RECVDELAY > 0
-          if (pstate->ir_buflen == 0)
-#else
           if (pstate->ir_recvlen > 0)
-#endif
             {
               ninfo("TCP resume\n");
 
@@ -765,23 +727,7 @@ static uint16_t inet_tcp_eventhandler(FAR struct net_driver_s *dev,
             }
           else
             {
-              /* If no data has been received, then return ENOTCONN.
-               * Otherwise, let this return success.  The failure will
-               * be reported the next time that recv[from]() is called.
-               */
-
-#if CONFIG_NET_TCP_RECVDELAY > 0
-              if (pstate->ir_recvlen > 0)
-                {
-                  pstate->ir_result = 0;
-                }
-              else
-                {
-                  pstate->ir_result = -ENOTCONN;
-                }
-#else
               pstate->ir_result = -ENOTCONN;
-#endif
             }
 
           /* Wake up the waiting thread */
@@ -806,19 +752,9 @@ static uint16_t inet_tcp_eventhandler(FAR struct net_driver_s *dev,
           pstate->ir_cb->priv    = NULL;
           pstate->ir_cb->event   = NULL;
 
-          /* Report an error only if no data has been received. (If
-           * CONFIG_NET_TCP_RECVDELAY then ir_recvlen should always be
-           * less than or equal to zero).
-           */
-
-#if CONFIG_NET_TCP_RECVDELAY > 0
-          if (pstate->ir_recvlen <= 0)
-#endif
-            {
-              /* Report the timeout error */
+          /* Report the timeout error */
 
-              pstate->ir_result = -EAGAIN;
-            }
+          pstate->ir_result      = -EAGAIN;
 
           /* Wake up the waiting thread, returning either the error -EAGAIN
            * that signals the timeout event or the data received up to
@@ -1207,7 +1143,6 @@ static ssize_t inet_udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
   net_lock();
   inet_recvfrom_initialize(psock, buf, len, from, fromlen, &state);
 
-#ifdef CONFIG_NET_UDP_READAHEAD
   /* Copy the read-ahead data from the packet */
 
   inet_udp_readahead(&state);
@@ -1220,15 +1155,6 @@ static ssize_t inet_udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
 
   ret = state.ir_recvlen;
 
-#else
-  /* Otherwise, the default return value of zero is used (only for the case
-   * where len == state.ir_buflen is zero).
-   */
-
-  ret = 0;
-#endif
-
-#ifdef CONFIG_NET_UDP_READAHEAD
   /* Handle non-blocking UDP sockets */
 
   if (_SS_ISNONBLOCK(psock->s_flags))
@@ -1253,7 +1179,6 @@ static ssize_t inet_udp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
    */
 
   else if (state.ir_recvlen <= 0)
-#endif
     {
       /* Get the device that will handle the packet transfers.  This may be
        * NULL if the UDP socket is bound to INADDR_ANY.  In that case, no
@@ -1336,7 +1261,6 @@ static ssize_t inet_tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
    * socket has been disconnected.
    */
 
-#ifdef CONFIG_NET_TCP_READAHEAD
   inet_tcp_readahead(&state);
 
   /* The default return value is the number of bytes that we just copied
@@ -1347,14 +1271,6 @@ static ssize_t inet_tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
 
   ret = state.ir_recvlen;
 
-#else
-  /* Otherwise, the default return value of zero is used (only for the case
-   * where len == state.ir_buflen is zero).
-   */
-
-  ret = 0;
-#endif
-
   /* Verify that the SOCK_STREAM has been and still is connected */
 
   if (!_SS_ISCONNECTED(psock->s_flags))
@@ -1370,11 +1286,7 @@ static ssize_t inet_tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
        * end-of-file indication.
        */
 
-#ifdef CONFIG_NET_TCP_READAHEAD
       if (ret <= 0 && !_SS_ISCLOSED(psock->s_flags))
-#else
-      if (!_SS_ISCLOSED(psock->s_flags))
-#endif
         {
           /* Nothing was previously received from the readahead buffers.
            * The SOCK_STREAM must be (re-)connected in order to receive any
@@ -1391,9 +1303,7 @@ static ssize_t inet_tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
    * if no data was obtained from the read-ahead buffers.
    */
 
-  else
-#ifdef CONFIG_NET_TCP_READAHEAD
-  if (_SS_ISNONBLOCK(psock->s_flags))
+  else if (_SS_ISNONBLOCK(psock->s_flags))
     {
       /* Return the number of bytes read from the read-ahead buffer if
        * something was received (already in 'ret'); EAGAIN if not.
@@ -1413,27 +1323,19 @@ static ssize_t inet_tcp_recvfrom(FAR struct socket *psock, FAR void *buf, size_t
    */
 
   else
-#endif
 
   /* We get here when we we decide that we need to setup the wait for incoming
    * TCP/IP data.  Just a few more conditions to check:
    *
    * 1) Make sure thet there is buffer space to receive additional data
-   *    (state.ir_buflen > 0).  This could be zero, for example, if read-ahead
-   *    buffering was enabled and we filled the user buffer with data from
-   *    the read-ahead buffers.  And
-   * 2) if read-ahead buffering is enabled (CONFIG_NET_TCP_READAHEAD)
-   *    and delay logic is disabled (CONFIG_NET_TCP_RECVDELAY == 0), then we
-   *    not want to wait if we already obtained some data from the read-ahead
-   *    buffer.  In that case, return now with what we have (don't want for more
-   *    because there may be no timeout).
+   *    (state.ir_buflen > 0).  This could be zero, for example,  we filled
+   *    the user buffer with data from the read-ahead buffers.  And
+   * 2) then we not want to wait if we already obtained some data from the
+   *    read-ahead buffer.  In that case, return now with what we have (don't
+   *    want for more because there may be no timeout).
    */
 
-#if CONFIG_NET_TCP_RECVDELAY == 0 && defined(CONFIG_NET_TCP_READAHEAD)
   if (state.ir_recvlen == 0 && state.ir_buflen > 0)
-#else
-  if (state.ir_buflen > 0)
-#endif
     {
       FAR struct tcp_conn_s *conn = (FAR struct tcp_conn_s *)psock->s_conn;
 
diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index 2f03075..ff856ee 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -287,28 +287,12 @@ static sockcaps_t inet_sockcaps(FAR struct socket *psock)
     {
 #ifdef NET_TCP_HAVE_STACK
       case SOCK_STREAM:
-        /* REVISIT:  Non-blocking recv() depends on CONFIG_NET_TCP_READAHEAD,
-         * but non-blocking send() depends on CONFIG_NET_TCP_WRITE_BUFFERS.
-         */
-
-#ifdef CONFIG_NET_TCP_READAHEAD
         return SOCKCAP_NONBLOCKING;
-#else
-        return 0;
-#endif
 #endif
 
 #ifdef NET_UDP_HAVE_STACK
       case SOCK_DGRAM:
-        /* REVISIT:  Non-blocking recvfrom() depends on CONFIG_NET_UDP_READAHEAD,
-         * but non-blocking sendto() depends on CONFIG_NET_UDP_WRITE_BUFFERS.
-         */
-
-#ifdef CONFIG_NET_UDP_READAHEAD
         return SOCKCAP_NONBLOCKING;
-#else
-        return 0;
-#endif
 #endif
 
       default:
diff --git a/net/tcp/Kconfig b/net/tcp/Kconfig
index 9319c62..325f7b7 100644
--- a/net/tcp/Kconfig
+++ b/net/tcp/Kconfig
@@ -8,6 +8,7 @@ menu "TCP/IP Networking"
 config NET_TCP
 	bool "TCP/IP Networking"
 	default n
+	select NET_READAHEAD if !NET_TCP_NO_STACK
 	---help---
 		Enable or disable TCP networking support.
 
@@ -90,30 +91,10 @@ config NET_TCP_NOTIFIER
 		purpose notifier, but was developed specifically to support poll()
 		logic where the poll must wait for these events.
 
-config NET_TCP_READAHEAD
-	bool "Enable TCP/IP read-ahead buffering"
-	default y
-	select NET_READAHEAD
-	select MM_IOB
-	---help---
-		Read-ahead buffers allows buffering of TCP/IP packets when there is no
-		receive in place to catch the TCP packet.  In that case, the packet
-		will be retained in the NuttX read-ahead buffers.
-
-		You might want to disable TCP/IP read-ahead buffering on a highly
-		memory constrained system that does not have any TCP/IP packet rate
-		issues.  But, if disabled, there will probably be more packet
-		retransmissions or even packet loss.
-
-		Make sure that you check the setting in the I/O Buffering menu.
-		These settings are critical to the reasonable operation of read-
-		ahead buffering.
-
 config NET_TCP_WRITE_BUFFERS
 	bool "Enable TCP/IP write buffering"
 	default n
 	select NET_WRITE_BUFFERS
-	select MM_IOB
 	---help---
 		Write buffers allows buffering of ongoing TCP/IP packets, providing
 		for higher performance, streamed output.
@@ -157,20 +138,6 @@ config NET_TCP_WRBUFFER_DUMP
 
 endif # NET_TCP_WRITE_BUFFERS
 
-config NET_TCP_RECVDELAY
-	int "TCP Rx delay"
-	default 0
-	---help---
-		If NET_TCP_READAHEAD_BUFFERS is undefined, then there will be no buffering
-		of TCP/IP packets:  Any TCP/IP packet received will be ACKed, but its contents
-		will be dropped in the bit-bucket.
-
-		One low-performance option is delay for a short period of time after a
-		TCP/IP packet is received to see if another comes right behind it. Then
-		the packet data from both can be combined.  This option only makes since
-		if performance is not an issue and you need to handle short bursts of
-		small, back-to-back packets.  The delay is in units of deciseconds.
-
 config NET_TCPBACKLOG
 	bool "TCP/IP backlog support"
 	default n
diff --git a/net/tcp/tcp.h b/net/tcp/tcp.h
index 5430bc4..5253018 100644
--- a/net/tcp/tcp.h
+++ b/net/tcp/tcp.h
@@ -208,7 +208,6 @@ struct tcp_conn_s
 
   FAR struct net_driver_s *dev;
 
-#ifdef CONFIG_NET_TCP_READAHEAD
   /* Read-ahead buffering.
    *
    *   readahead - A singly linked list of type struct iob_qentry_s
@@ -216,7 +215,6 @@ struct tcp_conn_s
    */
 
   struct iob_queue_s readahead;   /* Read-ahead buffering */
-#endif
 
 #ifdef CONFIG_NET_TCP_WRITE_BUFFERS
   /* Write buffering
@@ -1109,10 +1107,8 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NET_TCP_READAHEAD
 uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer,
                          uint16_t nbytes);
-#endif
 
 /****************************************************************************
  * Name: tcp_backlogcreate
@@ -1708,7 +1704,7 @@ int tcp_notifier_teardown(int key);
  *
  ****************************************************************************/
 
-#if defined(CONFIG_NET_TCP_READAHEAD) && defined(CONFIG_NET_TCP_NOTIFIER)
+#ifdef CONFIG_NET_TCP_NOTIFIER
 void tcp_readahead_signal(FAR struct tcp_conn_s *conn);
 #endif
 
diff --git a/net/tcp/tcp_callback.c b/net/tcp/tcp_callback.c
index 73f49f1..ba2d4d7 100644
--- a/net/tcp/tcp_callback.c
+++ b/net/tcp/tcp_callback.c
@@ -89,22 +89,18 @@ tcp_data_event(FAR struct net_driver_s *dev, FAR struct tcp_conn_s *conn,
 
   if (dev->d_len > 0)
     {
-#ifdef CONFIG_NET_TCP_READAHEAD
       uint8_t *buffer = dev->d_appdata;
       int      buflen = dev->d_len;
       uint16_t recvlen;
-#endif
 
       ninfo("No listener on connection\n");
 
-#ifdef CONFIG_NET_TCP_READAHEAD
       /* Save as the packet data as in the read-ahead buffer.  NOTE that
        * partial packets will not be buffered.
        */
 
       recvlen = tcp_datahandler(conn, buffer, buflen);
       if (recvlen < buflen)
-#endif
         {
           /* There is no handler to receive new data and there are no free
            * read-ahead buffers to retain the data -- drop the packet.
@@ -241,7 +237,6 @@ uint16_t tcp_callback(FAR struct net_driver_s *dev,
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NET_TCP_READAHEAD
 uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer,
                          uint16_t buflen)
 {
@@ -298,6 +293,5 @@ uint16_t tcp_datahandler(FAR struct tcp_conn_s *conn, FAR uint8_t *buffer,
   ninfo("Buffered %d bytes\n", buflen);
   return buflen;
 }
-#endif /* CONFIG_NET_TCP_READAHEAD */
 
 #endif /* NET_TCP_HAVE_STACK */
diff --git a/net/tcp/tcp_conn.c b/net/tcp/tcp_conn.c
index 1f3465c..180094e 100644
--- a/net/tcp/tcp_conn.c
+++ b/net/tcp/tcp_conn.c
@@ -775,11 +775,9 @@ void tcp_free(FAR struct tcp_conn_s *conn)
       dq_rem(&conn->node, &g_active_tcp_connections);
     }
 
-#ifdef CONFIG_NET_TCP_READAHEAD
   /* Release any read-ahead buffers attached to the connection */
 
   iob_free_queue(&conn->readahead, IOBUSER_NET_TCP_READAHEAD);
-#endif
 
 #ifdef CONFIG_NET_TCP_WRITE_BUFFERS
   /* Release any write buffers attached to the connection */
@@ -1020,11 +1018,9 @@ FAR struct tcp_conn_s *tcp_alloc_accept(FAR struct net_driver_s *dev,
 
       memcpy(conn->rcvseq, tcp->seqno, 4);
 
-#ifdef CONFIG_NET_TCP_READAHEAD
       /* Initialize the list of TCP read-ahead buffers */
 
       IOB_QINIT(&conn->readahead);
-#endif
 
 #ifdef CONFIG_NET_TCP_WRITE_BUFFERS
       /* Initialize the write buffer lists */
@@ -1257,11 +1253,9 @@ int tcp_connect(FAR struct tcp_conn_s *conn, FAR const struct sockaddr *addr)
   conn->sndseq_max = 0;
 #endif
 
-#ifdef CONFIG_NET_TCP_READAHEAD
   /* Initialize the list of TCP read-ahead buffers */
 
   IOB_QINIT(&conn->readahead);
-#endif
 
 #ifdef CONFIG_NET_TCP_WRITE_BUFFERS
   /* Initialize the TCP write buffer lists */
diff --git a/net/tcp/tcp_netpoll.c b/net/tcp/tcp_netpoll.c
index e883c97..dca5ca3 100644
--- a/net/tcp/tcp_netpoll.c
+++ b/net/tcp/tcp_netpoll.c
@@ -302,15 +302,9 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
 
   fds->priv    = (FAR void *)info;
 
-#ifdef CONFIG_NET_TCP_READAHEAD
   /* Check for read data or backlogged connection availability now */
 
   if (!IOB_QEMPTY(&conn->readahead) || tcp_backlogavailable(conn))
-#else
-  /* Check for backlogged connection now */
-
-  if (tcp_backlogavailable(conn))
-#endif
     {
       /* Normal data may be read without blocking. */
 
diff --git a/net/tcp/tcp_notifier.c b/net/tcp/tcp_notifier.c
index 23673cf..acd6404 100644
--- a/net/tcp/tcp_notifier.c
+++ b/net/tcp/tcp_notifier.c
@@ -85,7 +85,6 @@ int tcp_readahead_notifier_setup(worker_t worker,
                                  FAR struct tcp_conn_s *conn,
                                  FAR void *arg)
 {
-#ifdef CONFIG_NET_TCP_READAHEAD
   struct work_notifier_s info;
 
   DEBUGASSERT(worker != NULL);
@@ -108,9 +107,6 @@ int tcp_readahead_notifier_setup(worker_t worker,
   info.worker    = worker;
 
   return work_notifier_setup(&info);
-#else
-  return 0;
-#endif
 }
 
 /****************************************************************************
@@ -269,14 +265,12 @@ int tcp_notifier_teardown(int key)
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NET_TCP_READAHEAD
 void tcp_readahead_signal(FAR struct tcp_conn_s *conn)
 {
   /* This is just a simple wrapper around work_notifier_signal(). */
 
   return work_notifier_signal(WORK_TCP_READAHEAD, conn);
 }
-#endif
 
 /****************************************************************************
  * Name: tcp_writebuffer_signal
diff --git a/net/tcp/tcp_recvwindow.c b/net/tcp/tcp_recvwindow.c
index 694b965..c6b2dea 100644
--- a/net/tcp/tcp_recvwindow.c
+++ b/net/tcp/tcp_recvwindow.c
@@ -75,10 +75,8 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev)
   uint16_t iplen;
   uint16_t mss;
   uint16_t recvwndo;
-#ifdef CONFIG_NET_TCP_READAHEAD
-  int  niob_avail;
-  int  nqentry_avail;
-#endif
+  int niob_avail;
+  int nqentry_avail;
 
 #ifdef CONFIG_NET_IPv6
 #ifdef CONFIG_NET_IPv4
@@ -106,7 +104,6 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev)
 
   mss = dev->d_pktsize - (NET_LL_HDRLEN(dev) + iplen + TCP_HDRLEN);
 
-#ifdef CONFIG_NET_TCP_READAHEAD
   /* Update the TCP received window based on read-ahead I/O buffer
    * and IOB chain availability.  At least one queue entry is required.
    * If one queue entry is available, then the amount of read-ahead
@@ -168,7 +165,6 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev)
       recvwndo = (uint16_t)rwnd;
     }
   else /* nqentry_avail == 0 || niob_avail == 0 */
-#endif
     {
       /* No IOB chains or noIOBs are available.  The only buffering
        * available is within the packet buffer itself.  We can buffer no
diff --git a/net/udp/Kconfig b/net/udp/Kconfig
index 095d86a..24e0536 100644
--- a/net/udp/Kconfig
+++ b/net/udp/Kconfig
@@ -8,6 +8,7 @@ menu "UDP Networking"
 config NET_UDP
 	bool "UDP Networking"
 	default n
+	select NET_READAHEAD if !NET_UDP_NO_STACK
 	depends on NET
 	---help---
 		Enable or disable UDP networking support.
@@ -59,17 +60,10 @@ config NET_UDP_NPOLLWAITERS
 	int "Number of UDP poll waiters"
 	default 1
 
-config NET_UDP_READAHEAD
-	bool "Enable UDP/IP read-ahead buffering"
-	default y
-	select NET_READAHEAD
-	select MM_IOB
-
 config NET_UDP_WRITE_BUFFERS
 	bool "Enable UDP/IP write buffering"
 	default n
 	select NET_WRITE_BUFFERS
-	select MM_IOB
 	---help---
 		Write buffers allows buffering of ongoing UDP/IP packets, providing
 		for higher performance, streamed output.
diff --git a/net/udp/udp.h b/net/udp/udp.h
index d63b1f7..c2aa4de 100644
--- a/net/udp/udp.h
+++ b/net/udp/udp.h
@@ -48,10 +48,7 @@
 
 #include <nuttx/clock.h>
 #include <nuttx/net/ip.h>
-
-#ifdef CONFIG_NET_UDP_READAHEAD
-#  include <nuttx/mm/iob.h>
-#endif
+#include <nuttx/mm/iob.h>
 
 #ifdef CONFIG_NET_UDP_NOTIFIER
 #  include <nuttx/wqueue.h>
@@ -143,7 +140,6 @@ struct udp_conn_s
                            * Unbound: 0, Bound: 1-MAX_IFINDEX */
 #endif
 
-#ifdef CONFIG_NET_UDP_READAHEAD
   /* Read-ahead buffering.
    *
    *   readahead - A singly linked list of type struct iob_qentry_s
@@ -151,7 +147,6 @@ struct udp_conn_s
    */
 
   struct iob_queue_s readahead;   /* Read-ahead buffering */
-#endif
 
 #ifdef CONFIG_NET_UDP_WRITE_BUFFERS
   /* Write buffering
@@ -814,7 +809,7 @@ int udp_notifier_teardown(int key);
  *
  ****************************************************************************/
 
-#if defined(CONFIG_NET_UDP_READAHEAD) && defined(CONFIG_NET_UDP_NOTIFIER)
+#ifdef CONFIG_NET_UDP_NOTIFIER
 void udp_readahead_signal(FAR struct udp_conn_s *conn);
 #endif
 
diff --git a/net/udp/udp_callback.c b/net/udp/udp_callback.c
index 8b882a6..6d8cb35 100644
--- a/net/udp/udp_callback.c
+++ b/net/udp/udp_callback.c
@@ -75,7 +75,6 @@
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NET_UDP_READAHEAD
 static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
                                 FAR struct udp_conn_s *conn,
                                 FAR uint8_t *buffer, uint16_t buflen)
@@ -245,7 +244,6 @@ static uint16_t udp_datahandler(FAR struct net_driver_s *dev,
   ninfo("Buffered %d bytes\n", buflen);
   return buflen;
 }
-#endif /* CONFIG_NET_UDP_READAHEAD */
 
 /****************************************************************************
  * Name: net_dataevent
@@ -260,11 +258,9 @@ net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn,
               uint16_t flags)
 {
   uint16_t ret;
-#ifdef CONFIG_NET_UDP_READAHEAD
   uint8_t *buffer = dev->d_appdata;
   int      buflen = dev->d_len;
   uint16_t recvlen;
-#endif
 
   ret = (flags & ~UDP_NEWDATA);
 
@@ -274,14 +270,12 @@ net_dataevent(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn,
 
   ninfo("No receive on connection\n");
 
-#ifdef CONFIG_NET_UDP_READAHEAD
   /* Save as the packet data as in the read-ahead buffer.  NOTE that
    * partial packets will not be buffered.
    */
 
   recvlen = udp_datahandler(dev, conn, buffer, buflen);
   if (recvlen < buflen)
-#endif
     {
       /* There is no handler to receive new data and there are no free
        * read-ahead buffers to retain the data -- drop the packet.
diff --git a/net/udp/udp_conn.c b/net/udp/udp_conn.c
index 83e1fd7..45e0f7d 100644
--- a/net/udp/udp_conn.c
+++ b/net/udp/udp_conn.c
@@ -617,11 +617,9 @@ void udp_free(FAR struct udp_conn_s *conn)
 
   dq_rem(&conn->node, &g_active_udp_connections);
 
-#ifdef CONFIG_NET_UDP_READAHEAD
   /* Release any read-ahead buffers attached to the connection */
 
   iob_free_queue(&conn->readahead, IOBUSER_NET_UDP_READAHEAD);
-#endif
 
 #ifdef CONFIG_NET_UDP_WRITE_BUFFERS
   /* Release any write buffers attached to the connection */
diff --git a/net/udp/udp_netpoll.c b/net/udp/udp_netpoll.c
index c351ea5..076edf5 100644
--- a/net/udp/udp_netpoll.c
+++ b/net/udp/udp_netpoll.c
@@ -281,7 +281,6 @@ int udp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
 
   fds->priv = (FAR void *)info;
 
-#ifdef CONFIG_NET_UDP_READAHEAD
   /* Check for read data availability now */
 
   if (!IOB_QEMPTY(&conn->readahead))
@@ -290,7 +289,6 @@ int udp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
 
       fds->revents |= (POLLRDNORM & fds->events);
     }
-#endif
 
   if (psock_udp_cansend(psock) >= 0)
     {
diff --git a/net/udp/udp_notifier.c b/net/udp/udp_notifier.c
index e2c909a..37a57f5 100644
--- a/net/udp/udp_notifier.c
+++ b/net/udp/udp_notifier.c
@@ -83,7 +83,6 @@ int udp_readahead_notifier_setup(worker_t worker,
                                  FAR struct udp_conn_s *conn,
                                  FAR void *arg)
 {
-#ifdef CONFIG_NET_UDP_READAHEAD
   struct work_notifier_s info;
 
   DEBUGASSERT(worker != NULL);
@@ -106,9 +105,6 @@ int udp_readahead_notifier_setup(worker_t worker,
   info.worker    = worker;
 
   return work_notifier_setup(&info);
-#else
-  return 0;
-#endif
 }
 
 /****************************************************************************
@@ -215,14 +211,12 @@ int udp_notifier_teardown(int key)
  *
  ****************************************************************************/
 
-#ifdef CONFIG_NET_UDP_READAHEAD
 void udp_readahead_signal(FAR struct udp_conn_s *conn)
 {
   /* This is just a simple wrapper around work_notifier_signal(). */
 
   return work_notifier_signal(WORK_UDP_READAHEAD, conn);
 }
-#endif
 
 /****************************************************************************
  * Name: udp_writebuffer_signal