Commit Graph

1668 Commits

Author SHA1 Message Date
Gregory Nutt
80fe482f1b net/mld/mld_leave.c: Fix a bad assertion. 2018-11-05 09:39:28 -06:00
Gregory Nutt
33ed27ae65 Squashed commit of the following:
net/mld: Checksum calculation needs to know the full size of the IPv6 header, including the size of the extension headers.  The payload size in the IPv64 header must include the extension headers (not considered part of the header in this case).  Fixes a few additional errors in size, endian-ness and checksum calculations.  Wireshark now reports the the outgoing Report has a good checksum.

    net/mld/mld_query.c:  Add a cast to assure that the left shift does not overflow.
2018-11-05 08:56:07 -06:00
Gregory Nutt
c6156818b0 net/mld: Fix some compile errors fill debug info is enabled. Fix some errors in formatting the Listerner report. Still has a checksum error. 2018-11-04 18:18:14 -06:00
Gregory Nutt
9a75a14800 net/mld: Implement MLDv1 compatibility mode. This completes coding of MLD. MLD is, howeer, still completely untested. 2018-11-04 14:07:27 -06:00
Gregory Nutt
b1a61834d9 net/mld: Review and update all MLD message receipt logic. Also ripple changs that are, hopefully, improvements back to IGMP. 2018-11-04 10:57:21 -06:00
Gregory Nutt
3eed2e01bc net/igmp: Backport some MLD design improments/fixes. 2018-11-04 07:43:51 -06:00
Gregory Nutt
a4dc759b4d net/mld: Defer all timeout-related operations to the work queue vs. handling within the timer interrupt. Need to notify the device driver for an immediate poll when there are MLD packets waiting to be sent. 2018-11-03 16:47:08 -06:00
Gregory Nutt
1c15aa3b2d Squashed commit of the following:
net/mld:  More updates from comparison with roughly leveraged code and the MDL RFCs 2710 and 3810.

    net/mld:  More updated from comparison with roughly leveraged code and the MDL RFCs 2710 and 3810.

    net/mld:  Beginning comparison with roughly leveraged code and the MDL RFCs 2710 and 3810.
2018-11-03 13:45:33 -06:00
Gregory Nutt
863f617262 net/igmp and net/mld: Fix problem when both IGMP and MLD are enabled. The cannot share the same group list in the network devices structure. 2018-11-03 07:06:30 -06:00
Gregory Nutt
42a018747e net/devif, net/tcp, and net/udp: Extend the logic of 6c0ab0e077 so that all support Transport protocols support by IPv6 can handle the presence of IPv6 header extension options. 2018-11-02 17:50:01 -06:00
Gregory Nutt
6c0ab0e077 Squashed commit of the following:
include/nuttx/net/ipv6ext.h:  Fix some terminology:  Hop-by-hop, not Hop-to-hop or Hop2hop.

    net/devif/ipv6_input.c and net/icmpv6/icmpv6_input.c:  Add logic to skiip over the variable number of IPv6 extension headers that may be present between the IPv6 header and the transport layer header.  The extension headers are simply ignored.  This is necessary because with MLD, certain incoming messages may have, at a mimimum, a Router Alert Hop-by-hop extension header.

    net/inet/ipv6_setsockopt.c:  Implement the IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP socket options.
2018-11-02 12:06:57 -06:00
Gregory Nutt
9f2cb42918 include/nuttx/net/ipv6ext.h: Create header file with all of the definitions of IPv6 extension headers that I could find. net/mld/mld_send.c: Correct the size and format of the Hop-to-hop, Router alert extension header. 2018-11-01 17:51:47 -06:00
Gregory Nutt
5b7ef856a0 Squashed commit of the following:
net/mld:  The MLD logic now compiles and is much less toxic.  It still is not a proper MLD implementation:  (1) It is basically a port of IGMP, tweaked to work with IPv6 and ICMPv6 MLD messages, (2) it needs a proper analysis and comparison with RFC 3810, and (3) it is completely untested.  For this reason, it will remain EXPERIMENTAL for some time.
    net/mld:  Add some missing macros, more fixes related to IPv6 vs IPv4 types,
    net/mld:  More compilation cleaning.  Most fixups for IPv6 vs IPv4 types.
    net/mld:  Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
    net/mld:  Add support for MLD statistics.
    net/mld:  Hook in MLD poll and packet transmission logic.
    net/mld:  Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input.  Add functions to catch MLD messages dispatched by ICMPv6 input logic.
    net/mld:  As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
    net/mld:  More compilation cleaning.  Most fixups for IPv6 vs IPv4 types.
    net/mld:  Hook crudely converted .c files into build system and resolve a few of the many, many compilation/design problems.
    net/mld:  Add support for MLD statistics.
    net/mld:  Hook in MLD poll and packet transmission logic.
    net/mld:  Change references to IPv4 definitions to IPv6 definitions; Remove mld_input() since MLD piggybacks on ICMPv6 input.  Add functions to catch MLD messages dispatched by ICMPv6 input logic.
    net/mld:  As a starting point, copy all net/igmp/*.c files to net/mld/. and change all occurrences of igmp (or IGMP) to mld (or MLD).
2018-11-01 15:19:47 -06:00
Gregory Nutt
933d38a209 include/nuttx/net/igmp.h: Remove bogus support for IPv6 IGMP. There is no such thing. 2018-11-01 08:53:48 -06:00
Gregory Nutt
928dde3472 net/: Add some comments; fix some spelling. 2018-11-01 07:52:32 -06:00
Gregory Nutt
f5ed6bf672 net/inet/ipv4_setsockopt.c: Add implementation for all IPv4 socket options that have implemented IOCTL command counterparts. 2018-10-31 17:15:23 -06:00
Gregory Nutt
0330743a9d net/inet: Add framework to support IPv4 and IPv6 protocol socket options (i.e., SOL_IP and SOL_IP6). This is build framework only (not actual socket options are yet handled). Handling of these socket options is a necessary step on the way to future ICMPv6 MLD support. 2018-10-31 15:59:05 -06:00
Gregory Nutt
6d93658ff8 Add new configuratin CONFIG_NET_MCASTGROUP. This option is selected automatically if either CONFIG_NET_IGMP or CONFIG_NET_MLD are selected. Most conditional logic based on CONFIG_NET_IGMP replaced with conditioning on CONFIG_NET_MCASTGROUP. 2018-10-31 15:03:51 -06:00
Gregory Nutt
dde1e89b8c 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
Gregory Nutt
88130a996a net/: Fixes for more coding standard issues detected by nxstyle. 2018-10-29 18:00:30 -06:00
Gregory Nutt
dcb7ce8afd tools/nxstyle.c: Add logic to catch another formatting error and to eliminate some false alarms. Includes cosmetic changes to several files ... mostly as a result of testing nxstyle and finding issues. 2018-10-29 16:25:57 -06:00
Gregory Nutt
7d2b250cbc net/netdev: All utility functions that lookup network devices should begin with netdev_findby_. Also correct some comments and the name of a formal parameter. 2018-10-29 12:21:22 -06:00
Anthony Merlino
ad887ec34c Merged in antmerlino/nuttx/sixlowpan-warning (pull request #744)
net/sixlowpan/sixlowpan_hc06.c: Fixes warning introduced by recent changes to uncompress_addr.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-29 15:05:58 +00:00
Gregory Nutt
9f754ed1dc include/sys/sockio.h, net/netdev/netdev_ioctl.c: Fix a compile error introducted with commit 34db6d1433. That commit added the semi-standard ip_msfilter structure to netinet/in.h. Howver, there was a non-standard version of that structure in sys/sockio.h. This commit removes the non-standard version of struct ip_msfilter and adapts the IOCTL and device lookup logic in net/netdev to work with the new, semi-standard version in netinet/in.h. 2018-10-29 06:50:47 -06:00
Anthony Merlino
4898c477a9 Merged in antmerlino/nuttx/multicast-fix (pull request #739)
Fixes logic in ipv6_input to handle more than ff02::/16 multicast addresses. Don't forward mcast packets if scope is not appropriate

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-27 18:12:37 +00:00
Anthony Merlino
1adfef8113 Merged in antmerlino/nuttx/sixlowpan-mcast-uncompress (pull request #738)
net/sixlowpan: Fixes bug in uncompress_addr handling of odd postfix.

This affected multicast compress/uncompress since it's the only logic that used an odd postfix. The odd byte needs to be handled first, not last.

Approved-by: GregoryN <gnutt@nuttx.org>
2018-10-27 18:07:47 +00:00
Sakari Kapanen
f185c79ea6 nuttx/net/tcp/tcp_input.c: Fix recovery when ackseq > unackseq. The comment near this line says "reset the number of outstanding, unacknowledged bytes". However, the code actually resets the whole TCP connection. It was changed to the current form in commit f034d84ea1 with no explanation of the intent. Recover the line to what it was before that commit. 2018-10-24 09:10:56 -06:00
Gregory Nutt
a85f0e4cd5 networking: Update some comments to correct the naming used for the link layer. 2018-10-20 06:35:39 -06:00
Harri Luhtala
2d0f1b85e3 net/tcp/tcp_wrbuffer.c: fix buffer release handling on failed buffer alloc. Attempt to release write buffer on failed TCP write I/O buffer alloc and tryalloc failed to wrb->wb_iob assertion. 2018-09-25 07:02:04 -06:00
Gregory Nutt
dec7ecbd56 net/tcp/tcp_recvwindow.c: In order to receive data we must not only have IOBs available, but we must also have at least one IOB chain qentry available. Otherwise, we will advertise that we an buffer a lot of data when, in fact, we cannot. This is an expermental fix to a performance problem noted by Masayuki Ishikawa. 2018-09-22 09:33:29 -06:00
Gregory Nutt
a01cbede38 net/local/local_fifo.c: Fix an error found in build testing. 2018-09-15 18:13:49 -06:00
Gregory Nutt
8c4cefdd10 Fix some new warndings found in build testing. 2018-09-15 13:22:45 -06:00
Gregory Nutt
3a4984a40b Rename file_close_detached() to juse file_close() for better consistency in naming. 2018-09-15 13:04:56 -06:00
Gregory Nutt
a7fd58c4db Squashed commit of the following:
many locations:  Change occurences of open() followed by file_detach() to file_open().  Change most non-controversion calls to open() to nx_open().

    fs/inode/fs_fileopen.c:  Flesh out file_open() with some interim, placeholder logic.

    fs/inode/fs_fileopen.c:  Add a framework for a file_open() implementation (no real logic in place yet).

    fs/vfs/fs_open.c:  Add nx_open() which is the same as open() except that it does not create a cancellation point nor does it modify the errno variable.
2018-09-15 10:49:41 -06:00
Jussi Kivilinna
17b0c9b6b0 net/inet/inet_sockif.c: Fix compiler warning noted by Xiang Xiao 2018-09-14 09:04:25 -06:00
Jussi Kivilinna
3a65d39eb8 net/usrsock: Revert 'net/usrsock: Optimize option dependence', commit 42f7c3e927. Re-allow combination of usrsock and NuttX TCP/IP stack. For example, in case device has Ethernet and mobile connectivity and NuttX TCP/IP stack is used when configured to use Ethernet connection and usrsock when configured to use modem (modem TCP/IP stack through usrsock). 2018-09-14 07:18:37 -06:00
Gregory Nutt
9546481054 Fix some typographical errors. 2018-09-14 06:55:45 -06:00
Gregory Nutt
11d181d3d3 net/tcp/tcp_netpoll.c: 'if' should have been 'else if' 2018-09-12 15:14:24 -06:00
Gregory Nutt
6e60af91e4 net/udp/udp_netpoll.c: Port TCP poll changes to UDP. 2018-09-12 10:10:54 -06:00
Gregory Nutt
b3f0aab00a Squashed commit of the following:
sched/wqueue/kwork_notifier.c:  Redesign some data structures.  struct works_s must appear at the beginning of the notifier entry structure.  That is because it contains the work queue indices.  This solves a harfault issue.

    net/tcp/tcp_netpoll.c:  tcp_iob_work() needs to free the allocated argument when it is finished.

    net/tcp/tcp_send_buffered.c:  Extend psock_tcp_cansend() so that it also requires that at least on IOB is also avaialble.

    mm/iob:  iob_navail() was returning the number of free IOB chain queue entries, not the number of free IOBs.  Completely misnamed.

    net/tcp/tcp_netpoll.c:  Add logic to receive notifications when IOBs are freed (Needs CONFIG_NET_TCP_WRITE_BUFFERS and CONFIG_IOB_NOTIFIER).  At present, does nothing because the logic in in psock_tcp_cansend() does not check for the availability of IOBs.  That will change.
2018-09-12 08:57:06 -06:00
Gregory Nutt
76eec53e4f mm/iob: iob_navail() was returning the number of free IOB chain queue entries, not the number of free IOBs. Completely misnamed. 2018-09-12 06:40:18 -06:00
Gregory Nutt
a680553f35 net/tcp/tcp_netpoll.c: Add logic to receive notifications when IOBs are freed (Needs CONFIG_NET_TCP_WRITE_BUFFERS and CONFIG_IOB_NOTIFIER). At present, does nothing because the logic in in psock_tcp_cansend() does not check for the availability of IOBs. That will change. 2018-09-12 06:40:18 -06:00
Gregory Nutt
884ee6e43e net/tcp and net/udp: In the POLLOUT poll logic, request an immediate Tx poll from the network device bound to the socket. This obviously cannot work if there is not single device bound to the network device. 2018-09-11 10:31:11 -06:00
Gregory Nutt
11a635dcb3 mm/iob: IOB free notifier should accept the work queue ID as a paramter. The notification may need to run on either the high- or low- priority work queue. sched/work: Change the default priority of the low-priority work queue to 100. 2018-09-11 08:49:39 -06:00
Gregory Nutt
af0ee3c8f7 sched/wqueue: Add an option to work queue notifier so that the notification can occur on different work queues. 2018-09-11 07:22:23 -06:00
Gregory Nutt
09d5d05b95 net/TCP: Extend the TCP notification logic logic so that it will also report loss of connection events. 2018-09-09 17:32:10 -06:00
Gregory Nutt
9d3148406c Signals were not a good choice of IPC to implement the poll function for several reasons: In order to handle the asynchrnous poll-related event, a substantial amount of state information is needed. Signals are only capable of passing minimal amounts of data. There are also complexities with performing kernel space signal handlers in kernel space code that is better to avoid. So, instead of signals, the equivalent logic was converted to run via a callback that executes on the high-priority work queue.
Squashed commit of the following:

    Fix up some final compile isses.

    net/netdev:  Convert the network down notification logic to use the new wqueue-based notification factility.

    net/udp:  Convert the UDP readahead notification logic to use the new wqueue-based notification factility.

    net/tcp:  Convert the TCP readahead notification logic to use the new wqueue-based notification factility.

    mm/iob:  Convert the IOB notification logic to use the new wqueue-based notification factility.

    sched/wqueue:  Signals are not good IPCs to support the target poll functionality for several reasons including the amount of data that can be passed with a signal and in the fact that in protected and kernel modes, user threads executing signal handlers in protected, kernel memory is problematic.  Instead, convert the same logic to perform the notifications via function callback on the high priority work queue.
2018-09-09 15:01:44 -06:00
Gregory Nutt
20814acad2 sched/signal: In signal notification facility, use sigqueue() to notify vs. kill(). With sigqueue, we can pass more info (but still not enough). 2018-09-09 11:57:25 -06:00
Gregory Nutt
32e3e51678 net/netdev: Add signal notification for the case where the network goes down. 2018-09-09 10:39:25 -06:00
Gregory Nutt
28f73bd928 net/tcp and udp: Add logic to signal events when TCP or UDP read-ahead data is buffered.
Squashed commit of the following:

    net/tcp:  Add signal notification for the case when UDP read-ahead data is buffered.  This is basically of clone of the TCP notification logic with naming adapted for UDP.

    net/tcp:  Add signal notification for the case when TCP read-ahead data is buffered.
2018-09-09 09:21:39 -06:00
Gregory Nutt
bb92b98dc0 net/arp/arp_out.c: Fix some backward logic in an if condition. 2018-08-29 10:51:44 -06:00
dongjianli
09c689ea15 net/icmp and icmpv6: Fix failure to poll ICMP socket issue. 2018-08-26 15:37:03 -06:00
Xiang Xiao
40b0e98d25 net/icmp/icmp_conn.c and net/icmpv6/icmpv6_conn.c: Change the type of id in icmpv[6]_findconn to uint16_t 2018-08-26 15:28:02 -06:00
dongjianli
23f14c2660 net/usrsock: Add the listen/accept/getpeername/ioctl support 2018-08-26 15:15:48 -06:00
Xiang Xiao
42f7c3e927 net/usrsock: Optimize option dependence 2018-08-26 15:05:46 -06:00
ligd
3ae93762b7 net/usrsock/usrsock.h: Fix re-definitions of struct iovec. 2018-08-26 15:03:32 -06:00
Xiang Xiao
31b3dc6c27 net/usrsock: Combine some the duplicated logic. 2018-08-26 15:01:53 -06:00
Gregory Nutt
67193ff5c4 net/usrsock/: Correct of semphore usage issues. 2018-08-26 14:59:04 -06:00
dongjianli
b48804cfc2 net/netdev/netdev_ioctl.c: Add si_ioctl callback and net_ioctl_arglen so usrsock could forward the ioctl to the remote end 2018-08-26 14:54:26 -06:00
Xiang Xiao
3eedabfded net/socket/getsockname.c: Add psock_getsockname function 2018-08-26 14:43:13 -06:00
Xiang Xiao
fd1405d976 netdev_findby_ipv[4|6]addr return netdev_default() as last resort but don't return loopback device if another network device is in the UP state. 2018-08-26 14:40:47 -06:00
zhangyuan7
da1a323f34 net/tcp/tcp_monitor.c: Fix net unlock issue when tcp close. This bug could leave the net locked. 2018-08-26 14:32:06 -06:00
Xiang Xiao
49548da297 net/Kconfig: Uncomment the prompt of NET_SLIP_PKTSIZE 2018-08-26 14:28:35 -06:00
Xiang Xiao
bcf9360e5f Move psock check from [get|set]sockopt to psock_[get|set]sockopt 2018-08-26 14:25:54 -06:00
Xiang Xiao
3f50451046 fs/vfs/fs_fcntl.c, net/socket/net_dupsd.c, and net/socket/net_vfcntl.c: Add file_fcntl, psock_fcntl, and psock_dupsd for use within the kernel. 2018-08-26 13:31:18 -06:00
Gregory Nutt
5d042b41c3 Rename the file devif_loopbackout.c to devif_loopback.c 2018-08-25 08:36:02 -06:00
Gregory Nutt
9bc951a335 Rename devif_loopback_out to devi_loopback 2018-08-25 08:33:21 -06:00
Gregory Nutt
3bf96c8e7e net/arp: Improve arp_find() commit 9774d35010 to reduce the amount and frequency of data copies. 2018-08-25 07:12:21 -06:00
Gregory Nutt
324e1412ef net/arp: Costmetic update to comments. 2018-08-24 17:57:15 -06:00
Gregory Nutt
9774d35010 net/arp: Make the function arp_find() thread-safe. It now returns a copy of the ARP table entry, rather than a potentially unstable reference to the ARP table entry. 2018-08-24 17:36:08 -06:00
Xiang Xiao
0074afa0ac net/netdev: add devif_loopback_out() to check the loopback case where a packet is being sent to itself. Modify the net driver to call this function in this case. This function will simply re-inject the packet back into the network and the network driver will not put anything on the wire. 2018-08-24 09:21:33 -06:00
Xiang Xiao
f74ddd2a04 net/arp: arp_find() now checks if the target IP belongs to one of the local network devices. 2018-08-24 09:04:29 -06:00
Xiang Xiao
e1202d2ed3 Replace all ASSERT with DEBUGASSERT to save the code space 2018-08-24 06:58:30 -06:00
Gregory Nutt
af9fb080e0 fix a spelling error 2018-08-21 10:33:16 -06:00
Gregory Nutt
2e0860e193 net/procfs/netdev_statistics.c: Was not handling the output correct for the case of an IEEE 802.11 device. 2018-08-21 09:08:29 -06:00
Gregory Nutt
4b92f71a82 net/netdev/netdev_register.c: Eliminate a newly introduced warning. 2018-08-14 13:54:10 -06:00
Gregory Nutt
b00a2e5c54 net/: Change order of logic: Select the user-defined interface name format BEFORE determining the minor device number. Otherwise, the devault interface name will be used. 2018-08-14 08:40:06 -06:00
Gregory Nutt
4a724b1f3c net/: Remove all references to CONFIG_NET_USER_DEVFMT. That feature is now unconditionally enabled. This was done because (1) the feature does not require very much additional memory, and (2) it causes confusion in the configuration due to the additional complexity. And network drivers that fail to zero the device structure interface name field (d_ifname) because calling netdev_register() will, however, get a nasty surprise. 2018-08-14 08:01:52 -06:00
Gregory Nutt
8c61c2f31b Remove trailing spaces at the end of lines. 2018-08-13 07:39:38 -06:00
Gregory Nutt
c2267a57a0 Kconfig files: Fix several errors noted by Alex Denisov in Bitbucket issue 115. 2018-08-05 10:48:02 -06:00
Gregory Nutt
056d704cf9 This commit brings in a fragmentary, experimental implementation of NETLINK sockets. There is not too much to that socket support on this initial commit, just the netlink socketer framework. However, I decided to bring it into master because there is a enough that I would not want to lose what is in place. And since it is dependent on CONFIG_EXPERIMENATL, its presence on master should be innocuous.
Squashed commit of the following:

    net/netlink:  Mark netlink support as EXPERIMENTAL.
    net/netlink/netlink_sockif.c:  Add netlink_getpeername to the socket interface.
    net:  Add getpeeername() support for netlink sockets.
    include/netpacket/netlink.h:  Add a few more definitions and structures used at the NetLink interface.  Still missing many.
    net/netlink:  Add basic framework for Netlink socket support.
    include/:  Add basic Netlink definitions.
2018-08-03 13:22:36 -06:00
Masayuki Ishikawa
ac5b2ea049 Merged in masayuki2009/nuttx.nuttx/fix_tcp_statistics (pull request #703)
net/tcp: Remove g_netstats.tcp.syndrop++ from tcp_data_event()

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>

Approved-by: GregoryN <gnutt@nuttx.org>
2018-08-03 01:25:53 +00:00
Gregory Nutt
ac5618239c Fix some errors in last commits found in build testing. 2018-07-19 10:30:52 -06:00
Gregory Nutt
788c5bf1dd Forgot to add files before previous commit. 2018-07-19 09:07:20 -06:00
ligd
e840038f2d net/ and include/nuttx/net: Add getpeername() support 2018-07-19 07:16:30 -06:00
Jake Choy
b1daa22040 net/udp/udp_finddev.c: Fix for network byte-order issue when checking if an address is a multicast address. 2018-07-17 11:18:11 -06:00
Alan Carvalho de Assis
283b73edc5 Fix lots of typos in C comments and Kconfig help text 2018-07-08 18:24:45 -06:00
Gregory Nutt
1783d344dc Eliminate some new warnings found in build testing. 2018-07-08 13:44:39 -06:00
Gregory Nutt
6571d4fa37 Update some comments. 2018-07-07 15:23:46 -06:00
Gregory Nutt
427b3b8fcb Squashed commit of the following:
net/utils:  return from net_breaklock() was being clobbered.
    net/:  Replace all calls to iob_alloc() with calls to net_ioballoc() which will release the network lock, if necessary.
    net/utils, tcp, include/net:  Separate out the special IOB allocation logic and place it in its own function.  Prototype is available in a public header file where it can also be used by network drivers.
    net/utils: net_timedwait() now uses new net_breaklock() and net_restorelock().
2018-07-07 08:26:13 -06:00
Gregory Nutt
75cc19ebb4 net/tcp: Fix a deadlock condition that can occur when (1) all network logic runs on a single work queue, (1) TCP write buffering is enabled, and (2) we run out of IOBs. In this case, the TCP write buffering logic was blocking on iob_alloc() with the network locked. Since the network was locked, the device driver polls that would provide take the write buffer data and release the IOBs could not execute. This fixes the problem by unlocking the network lock while waiting for the IOBs. 2018-07-06 19:49:05 -06:00
Gregory Nutt
23a8af2069 Trivial update to some comments. 2018-07-06 17:37:26 -06:00
Gregory Nutt
5764d5a529 net/tcp: Back out part of commit d944388888. I see a few places that say that the maximum receive window size is 32,767 (INT16_MAX), but most say that it is 65,535 (UINT16_MAX). 2018-07-05 17:41:01 -06:00
Gregory Nutt
d944388888 configs/viewtool-stm32f107: Add a TCP performance test using apps/examples/tcpblaster. 2018-07-05 16:08:03 -06:00
Gregory Nutt
73c4b1610b net/tcp: Set the default TCP MSS to the value required by RFC 879 and never change it under any circumstance unless the remote host requests a larger MSS via an option the TCP header. 2018-07-05 10:54:45 -06:00
Gregory Nutt
30657b769f net/udp/udp_setsockopt.c: Remove a warning about an uninitialized variable. 2018-07-04 18:28:17 -06:00
Gregory Nutt
e1f8b3ff3b Update some help comments in two Kconfig files. 2018-07-04 15:36:31 -06:00
Gregory Nutt
22cd0d47fa This commit attempts remove some long standard confusion in naming and some actual problems that result from the naming confusion. The basic problem is the standard MTU does not include the size of the Ethernet header. For clarity, I changed the naming of most things called MTU to PKTSIZE. For example, CONFIG_NET_ETH_MTU is now CONFIG_NET_ETH_PKTSIZE.
This makes the user interface a little hostile.  People thing of an MTU of 1500 bytes, but the corresponding packet is really 1514 bytes (including the 14 byte Ethernet header).  A more friendly solution would configure the MTU (as before), but then derive the packet buffer size by adding the MAC header length.  Instead, we define the packet buffer size then derive the MTU.

The MTU is not common currency in networking.  On the wire, the only real issue is the MSS which is derived from MTU by subtracting the IP header and TCP header sizes (for the case of TCP).  Now it is derived for the PKTSIZE by subtracting the IP header, the TCP header, and the MAC header sizes.  So we should be all good and without the recurring 14 byte error in MTU's and MSS's.

Squashed commit of the following:

    Trivial update to fix some spacing issues.
    net/: Rename several macros containing _MTU to _PKTSIZE.
    net/: Rename CONFIG_NET_SLIP_MTU to CONFIG_NET_SLIP_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_6LOWPAN_MTU to CONFIG_NET_6LOWPAN_PKTSIZE and similarly for CONFIG_NET_TUN_MTU.  These are not the MTU which does not include the size of the link layer header.  These are the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename CONFIG_NET_ETH_MTU to CONFIG_NET_ETH_PKTSIZE.  This is not the MTU which does not include the size of the link layer header.  This is the full size of the packet buffer memory (minus any GUARD bytes).
    net/: Rename the file d_mtu in the network driver structure to d_pktsize.  That value saved there is not the MTU.  The packetsize is the memory large enough to hold the maximum packet PLUS the size of the link layer header.  The MTU does not include the link layer header.
2018-07-04 14:10:40 -06:00
Gregory Nutt
254924029b net/udp: Restore some legacy behavior that was lost with the implementation of CONFIG_NET_UDP_BINDTODEVICE: If no device has a local address when the broadcast packet is sent and the UDP socket is not bound to a device, there select some arbitrary device. This is certainly lunacy in the case where there are multiple network devices registered because the wrong device will probably be returned. It works find, however, for the legacy case where only a single network device is registered. 2018-07-04 07:35:51 -06:00
Gregory Nutt
3e9ba72441 net/sixlowpan: Fix typo uint16->uint16_t. Also picks up some cosmetic USB host changes. 2018-07-01 10:05:15 -06:00