nuttx/net
Zhe Weng 075eb6a6d2 net/udp: Change conn->readahead to I/O buffer chain
When using IOB queue to store readahead data, we use one IOB for each
UDP packet. Then if the packets are very small, like 10Bytes per packet,
we'll use ~1600 IOBs just for 16KB recv buffer size, which is wasteful
and dangerous. So change conn->readahead to a single IOB chain like TCP.

Benefits:
- Using memory and IOBs more efficiently (small packets are common in
  UDP)

Side effects:
- UDP recv buffer size may count the overhead
- A little bit drop in performance (<1%, more seek & copy)

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-07-18 10:51:45 +08:00
..
arp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
bluetooth build: add initial cmake build system 2023-07-08 13:50:48 +08:00
can build: add initial cmake build system 2023-07-08 13:50:48 +08:00
devif build: add initial cmake build system 2023-07-08 13:50:48 +08:00
icmp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
icmpv6 build: add initial cmake build system 2023-07-08 13:50:48 +08:00
ieee802154 build: add initial cmake build system 2023-07-08 13:50:48 +08:00
igmp build: add initial cmake build system 2023-07-08 13:50:48 +08:00
inet build: add initial cmake build system 2023-07-08 13:50:48 +08:00
ipforward build: add initial cmake build system 2023-07-08 13:50:48 +08:00
ipfrag build: add initial cmake build system 2023-07-08 13:50:48 +08:00
local net/local: remove client from server.lc_waiters when client close 2023-07-17 09:01:36 +02:00
mld build: add initial cmake build system 2023-07-08 13:50:48 +08:00
nat net/nat: Fix compiler warning 2023-07-12 19:29:14 +08:00
neighbor build: add initial cmake build system 2023-07-08 13:50:48 +08:00
netdev build: add initial cmake build system 2023-07-08 13:50:48 +08:00
netfilter build: add initial cmake build system 2023-07-08 13:50:48 +08:00
netlink netlink: add some definition 2023-07-08 11:12:41 -03:00
pkt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
procfs net/udp: Change conn->readahead to I/O buffer chain 2023-07-18 10:51:45 +08:00
route build: add initial cmake build system 2023-07-08 13:50:48 +08:00
rpmsg build: add initial cmake build system 2023-07-08 13:50:48 +08:00
sixlowpan build: add initial cmake build system 2023-07-08 13:50:48 +08:00
socket build: add initial cmake build system 2023-07-08 13:50:48 +08:00
tcp net/udp: Change conn->readahead to I/O buffer chain 2023-07-18 10:51:45 +08:00
udp net/udp: Change conn->readahead to I/O buffer chain 2023-07-18 10:51:45 +08:00
usrsock build: add initial cmake build system 2023-07-08 13:50:48 +08:00
utils net: Rename tcp_dataconcat to net_iob_concat 2023-07-18 10:51:45 +08:00
CMakeLists.txt build: add initial cmake build system 2023-07-08 13:50:48 +08:00
Kconfig net: Limit max value for Send/Recv bufsize 2023-07-05 13:57:08 +08:00
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
       +- ipfrag     - Fragmentation and reassembly
       +- 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   |
    +----------------------------------------------------------------+ +--------------------------+