incubator-nuttx/net
Gregory Nutt 3c0b49448a Network Loopback Driver: A configuration option to control packet size.
Historically, the loopback driver used the largest packet size of all enabled link layer protocols.  This permitted packets to be forward via the loopbak device with no major loss of performance.  However, in experimenting with configurations where no other link layer protocols were enabled, this means the loopback packet size was set to the smallest possible size, to the SLIP minimum of 296 bytes.  This resulted in terrible loopback performance.

    This commit adds an option to increase the loopback packet size with the option CONFIG_NET_LOOPBACK_PACKETSIZE.

    The loopback driver packet buffer should be quite large.  The larger the loopback packet buffer, the better will be TCP performance of the loopback transfers.  The Linux loopback device historically used packet buffers of size 16Kb, but that was increased in recent Linux versions to 64Kb.  Those sizes may be excessive for resource constrained MCUs, however.

    The network still enforces the lower limit that is the maximum packet size of all enabled link layer protocols.  But this new option permits the loopback packet size to be increased from that.

    * net/Kconfig:  Adds CONFIG_NET_LOOPBACK_PKTSIZE option
    * include/nuttx/net/netconfig.h:  Assures that the packet size that is used is at least as large as the largest packet size of other link layer protocols.
    * drivers/net/loopback.c:  Use that larger packet size.
    * boards/sim/sim/sim/configs/tcploop/defconfig:  Set the loopback packet size to 1500
2020-02-10 22:17:32 -03:00
..
arp Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
bluetooth Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
devif Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
icmp Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
icmpv6 Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
ieee802154 Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
igmp net/igmp/igmp.h: include <nuttx/semaphore.h> to fix build break 2020-02-02 18:33:42 -08:00
inet Move _SF_BOUND and _SF_CONNECTED modification to common place 2020-01-31 13:45:14 -06:00
ipforward Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
local Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
loopback tools/nxstyle.c: Fix logic error that prevent detecion of '/' and '/=' as operators. net/: Minor updates resulting from testing tools/nxstyle. 2019-03-11 12:48:39 -06:00
mld Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
neighbor Refine the preprocessor conditional guard style (#190) 2020-01-31 19:07:39 +01:00
netdev Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
netlink Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
pkt Move _SF_BOUND and _SF_CONNECTED modification to common place 2020-01-31 13:45:14 -06:00
procfs Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
route Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
sixlowpan Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
socket Remove psock_send and sockfd_socket from net/socket/socket.h 2020-01-31 13:45:15 -06:00
tcp Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
udp Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
usrsock Replace #include <semaphore.h> to #include <nuttx/semaphore.h> 2020-02-01 08:27:30 -06:00
utils Remove psock_send and sockfd_socket from net/socket/socket.h 2020-01-31 13:45:15 -06:00
.gitignore
Kconfig Network Loopback Driver: A configuration option to control packet size. 2020-02-10 22:17:32 -03:00
Makefile net/mld: Add basic build structure for Multicast Listener Discovery (MLD). No real MLD logic yet. Only a few hooks to capture and dispatch MLD ICMPv6 packets. 2018-10-31 14:10:19 -06:00
README.txt net/mld: Add basic build structure for Multicast Listener Discovery (MLD). No real MLD logic yet. Only a few hooks to capture and dispatch MLD ICMPv6 packets. 2018-10-31 14:10:19 -06:00
net_initialize.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00

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
       +- loopback   - Local loopback
       +- 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   |
    +----------------------------------------------------------------+ +--------------------------+