nuttx/net/tcp
Petteri Aimonen 06e5b661ed tcp: Recover from iob shortage with TCP_WRITE_BUFFERS
When CONFIG_NET_TCP_WRITE_BUFFERS is enabled, iobs are used for
both queuing data from application, and for assembling packets
for sending. If there is a system-wide shortage of iobs, it could
happen that there is not enough free space to form any packets
to send. The buffers allocated for TCP data also can't be released
until the packet is sent.

Normally this should be avoided by setting suitable values for
CONFIG_IOB_NBUFFERS and CONFIG_IOB_THROTTLE. The default values
are ok for light usage, but can run out when using multiple
simultaneous TCP streams.

Before this commit, iob shortage would cause TCP connections to
get stuck and eventually timeout. With this change, TCP stack
sends smaller packets, eventually freeing some buffers from the
write queue.
2023-12-15 20:12:13 -08:00
..
CMakeLists.txt cmake:complete missing changes during reforming for net 2023-09-13 21:51:20 +08:00
Kconfig net/tcp: Support initial sequence number described in RFC 6528 2023-11-06 09:04:09 +08:00
Make.defs net/tcp:Add NewReno congestion control. 2023-05-16 12:35:01 -03:00
tcp_accept.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_appsend.c net/tcp: reuse common api to replace some ip select code 2023-01-30 11:25:10 +08:00
tcp_backlog.c mm/alloc: remove all unnecessary cast for alloc 2023-08-30 14:34:20 +08:00
tcp_callback.c net: Rename tcp_dataconcat to net_iob_concat 2023-07-18 10:51:45 +08:00
tcp_cc.c net/tcp:Add NewReno congestion control. 2023-05-16 12:35:01 -03:00
tcp_close.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_conn.c net: Support multiple IPv6 address per netdev 2023-11-07 19:30:36 +08:00
tcp_connect.c net: Support multiple IPv6 address per netdev 2023-11-07 19:30:36 +08:00
tcp_devpoll.c net/tcp: reuse common api to replace some ip select code 2023-01-30 11:25:10 +08:00
tcp_dump.c net: cleanup pvconn reference to avoid confuse 2022-08-26 20:58:11 +08:00
tcp_finddev.c net: modify find device logic 2023-02-12 01:25:34 +08:00
tcp_getsockopt.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_input.c tcp_ofosegs: prepare iob to reset io_offset 2023-09-20 14:32:16 +08:00
tcp_ioctl.c net: Simplify getting value for different domain 2023-11-03 22:23:50 +08:00
tcp_ipselect.c net/tcp: reuse common api to replace some ip select code 2023-01-30 11:25:10 +08:00
tcp_listen.c net/tcp: Remove tcp_listen_initialize 2022-03-12 19:24:17 +02:00
tcp_monitor.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_netpoll.c poll: pollsetup should notify only one fd passd by caller 2023-11-21 09:07:17 +01:00
tcp_notifier.c Typo fixes. 2023-02-17 11:17:11 -03:00
tcp_recvfrom.c net: Add msg_peek support for udp and tcp 2023-07-13 19:40:04 +08:00
tcp_recvwindow.c net/tcp: add out-of-order segment support 2023-01-18 16:24:09 +08:00
tcp_send_buffered.c tcp: Recover from iob shortage with TCP_WRITE_BUFFERS 2023-12-15 20:12:13 -08:00
tcp_send_unbuffered.c net/icmpv6: Fix icmpv6_neighbor for link-local address 2023-08-11 02:00:39 +08:00
tcp_send.c ipv6: Fix source address with many addresses in same network 2023-12-13 06:13:25 -08:00
tcp_sendfile.c net/icmpv6: Fix icmpv6_neighbor for link-local address 2023-08-11 02:00:39 +08:00
tcp_seqno.c net/tcp: Support initial sequence number described in RFC 6528 2023-11-06 09:04:09 +08:00
tcp_setsockopt.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_shutdown.c net: remove conn-related casts 2023-05-10 19:32:09 -03:00
tcp_timer.c tcp: fix coverity warning for tcp_timer 2023-09-19 09:37:20 +08:00
tcp_txdrain.c net/assert: remove all unnecessary check for psock/conn 2023-08-30 20:36:49 +08:00
tcp_wrbuffer.c net/xx/wrbuffer: Do not use SEM_INITIALIZER for buffers 2023-08-25 00:02:07 +08:00
tcp.h net/tcp: Support initial sequence number described in RFC 6528 2023-11-06 09:04:09 +08:00