837e1a72a4
* Send data chunk-by-chunk Note: A stream socket doesn't have atomicity requirement. * Increase the chance to use full-sized segments Benchmark numbers in my environment: * Over ESP32 wifi * The peer is NetBSD, which has traditional delayed ack TCP * iperf uses 16384 bytes buffer --- without this patch, CONFIG_IOB_NBUFFERS=36 CONFIG_IOB_BUFSIZE=196 does not work. see https://github.com/apache/incubator-nuttx/pull/2772#discussion_r592820639 --- without this patch, CONFIG_IOB_NBUFFERS=128 CONFIG_IOB_BUFSIZE=196 ``` nsh> iperf -c 192.168.8.1 IP: 192.168.8.103 mode=tcp-client sip=192.168.8.103:5001,dip=192.168.8.1:5001, interval=3, time=30 Interval Bandwidth 0- 3 sec, 4.11 Mbits/sec 3- 6 sec, 4.63 Mbits/sec 6- 9 sec, 4.89 Mbits/sec 9- 12 sec, 4.63 Mbits/sec 12- 15 sec, 4.85 Mbits/sec 15- 18 sec, 4.85 Mbits/sec 18- 21 sec, 5.02 Mbits/sec 21- 24 sec, 3.67 Mbits/sec 24- 27 sec, 4.94 Mbits/sec 27- 30 sec, 4.81 Mbits/sec 0- 30 sec, 4.64 Mbits/sec nsh> ``` --- with this patch, CONFIG_IOB_NBUFFERS=36 CONFIG_IOB_BUFSIZE=196 ``` nsh> iperf -c 192.168.8.1 IP: 192.168.8.103 mode=tcp-client sip=192.168.8.103:5001,dip=192.168.8.1:5001, interval=3, time=30 Interval Bandwidth 0- 3 sec, 5.33 Mbits/sec 3- 6 sec, 5.59 Mbits/sec 6- 9 sec, 5.55 Mbits/sec 9- 12 sec, 5.59 Mbits/sec 12- 15 sec, 5.59 Mbits/sec 15- 18 sec, 5.72 Mbits/sec 18- 21 sec, 5.68 Mbits/sec 21- 24 sec, 5.29 Mbits/sec 24- 27 sec, 4.67 Mbits/sec 27- 30 sec, 4.50 Mbits/sec 0- 30 sec, 5.35 Mbits/sec nsh> ``` --- with this patch, CONFIG_IOB_NBUFFERS=128 CONFIG_IOB_BUFSIZE=196 ``` nsh> iperf -c 192.168.8.1 IP: 192.168.8.103 mode=tcp-client sip=192.168.8.103:5001,dip=192.168.8.1:5001, interval=3, time=30 Interval Bandwidth 0- 3 sec, 5.51 Mbits/sec 3- 6 sec, 4.67 Mbits/sec 6- 9 sec, 4.54 Mbits/sec 9- 12 sec, 5.42 Mbits/sec 12- 15 sec, 5.37 Mbits/sec 15- 18 sec, 5.11 Mbits/sec 18- 21 sec, 5.07 Mbits/sec 21- 24 sec, 5.29 Mbits/sec 24- 27 sec, 5.77 Mbits/sec 27- 30 sec, 4.63 Mbits/sec 0- 30 sec, 5.14 Mbits/sec nsh> ``` |
||
---|---|---|
.. | ||
arp | ||
bluetooth | ||
can | ||
devif | ||
icmp | ||
icmpv6 | ||
ieee802154 | ||
igmp | ||
inet | ||
ipforward | ||
local | ||
mld | ||
neighbor | ||
netdev | ||
netlink | ||
pkt | ||
procfs | ||
route | ||
rpmsg | ||
sixlowpan | ||
socket | ||
tcp | ||
udp | ||
usrsock | ||
utils | ||
Kconfig | ||
Makefile | ||
net_initialize.c | ||
README.txt |
README ====== Directory Structure =================== nuttx/ | `- net/ | +- arp - Address resolution protocol (IPv4) +- bluetooth - PF_BLUETOOTH socket interface +- devif - Stack/device interface layer +- icmp - Internet Control Message Protocol (IPv4) +- icmpv6 - Internet Control Message Protocol (IPv6) +- ieee802154 - PF_IEEE802154 socket interface +- inet - PF_INET/PF_INET6 socket interface +- ipforward - IP forwarding logic +- local - Unix domain (local) sockets +- mld - Multicast Listener Discovery (MLD) +- neighbor - Neighbor Discovery Protocol (IPv6) +- netdev - Socket network device interface +- netlink - Netlink IPC socket interface +- pkt - "Raw" packet socket support +- sixlowpan - 6LoWPAN implementation +- socket - BSD socket interface +- route - Routing table support +- tcp - Transmission Control Protocol +- udp - User Datagram Protocol +- usrsock - User socket API for user-space networking stack `- utils - Miscellaneous utility functions +-------------------------------------------------------------------++------------------------+ | Application layer || usrsock daemon | +-------------------------------------------------------------------++------------------------+ +-------------------------------------------------------------------++----------------+ +-----+ | Socket layer (socket/) || /dev/usrsock | | | +-------------------------------------------------------------------++----------------+ | | +------------++--------------------------------------------------++-------------------+ | | | Network || Protocol stacks (arp, ipv6, icmp, pkt, tcp, udp) || usrsock/ | | | | Device |+--------------------------------------------------++-------------------+ | | | Interface |+------------------------------------++---------------------------------+ | | | (netdev/) || Network Device Interface (devif/) || Utilities | | | +------------++------------------------------------++---------------------------------+ | | +----------------------------------------------------------------+ | | | Network Device Drivers | | HAL | +----------------------------------------------------------------+ +-----+ +----------------------------------------------------------------+ +--------------------------+ | Networking Hardware | | Hardware TCP/IP Stack | +----------------------------------------------------------------+ +--------------------------+