Gregory Nutt
c2642eef3c
net/tcp/tcp_appsend.c: Enhance delayed ACK algorithm with behavior of Windows delayed ACK described at https://support.microsoft.com/en-nz/help/214397/design-issues-sending-small-data-segments-over-tcp-with-winsock : 'If there are data to be sent in the same direction as the ACK before the second data packet is received and the delay timer expires, the ACK is piggybacked with the data segment and sent immediately.'
2019-12-09 08:45:52 -06:00
Gregory Nutt
6a0ab27bd5
net/tcp/tcp_appsend.c: Update some comments.
2019-12-09 06:06:17 -06:00
Gregory Nutt
8cd5e04d53
net/tcp: Minor design improvement to TCP delayed ACKs.
2019-12-08 14:17:55 -06:00
Gregory Nutt
66ef6d143a
This commit adds an initial implemented of TCP delayed ACKs as specified in RFC 1122.
...
Squashed commit of the following:
net/tmp: Rename the unacked field of the tcp connection structure to tx_unacked. Too confusing with the implementation of delayed RX ACKs.
net/tcp: Initial implementation of TCP delayed ACKs.
net/tcp: Add delayed ACK configuration selection. Rename tcp_ack() to tcp_synack(). It may or may not send a ACK. It will always send SYN or SYN/ACK.
2019-12-08 13:13:51 -06:00
Gregory Nutt
16b1c276bd
net/netlink/netlink_conn.c: Fix some really basic errors in the redesign of the asynchronous Netlink response logic.
2019-11-28 16:14:59 -06:00
Gregory Nutt
4ae09a3b80
net/netlink: Redesign the logic that handles notifications of when response data is available. Signal handlers are sub-optimal inside the OS (especially after the preceding change which forces the hand). Instead, use the work queue notifiers as is done with all other network notifiers.
2019-11-28 14:20:40 -06:00
Gregory Nutt
69318b1024
Re-implements reverted commit 344f7bc9f6
in a way that should not have the undesired side-effect. include/nuttx/sched.h: Add a bit to the TCB flags to indicat the thread is a user thread in a syscall. sched/nuttx/nxsig_dispatch.c: Delay dispatching to signal handlers if within a system call. In all syscall implementations: Process delayed signal handling when exiting system call.
2019-11-28 12:47:36 -06:00
Gregory Nutt
cbdd590c82
Revert "include/nuttx/sched.h: Add storage for a previous signal mask. arch/: In all syscall implementations, block all signals before dispatching a system call; resotre signal mask when the system call returns."
...
Using the sigprocmask() for this purpose has too many side-effects.
This reverts commit 344f7bc9f6
.
2019-11-28 11:57:54 -06:00
Gregory Nutt
344f7bc9f6
include/nuttx/sched.h: Add storage for a previous signal mask. arch/: In all syscall implemenations, block all signals before dispatching a system call; resotre signal mask when the system call returnes.
2019-11-28 10:51:29 -06:00
Gregory Nutt
d1593bb336
Squashed commit of the following:
...
net/netlink/netlink_sockif.c: At implementation of response available signal handler needed for POLLIN logic.
net/netlink/netlink_sockif.c: Add logic to set up signal handler to receive the response notification.
2019-11-27 21:30:01 -06:00
Gregory Nutt
a8f3c3651a
net/netlink/netlink_conn.c: Use nxsig_queue() instead of nxsig_kill() so that we can pass a reference to the connection structure with the signal.
2019-11-27 19:31:23 -06:00
Xiang Xiao
e1e192fc33
net/: icmp[v6] fix ping[6] complain 'WARNING: Received after timeout'. The root cause is that icmp[v6]_pollsetup monitors ICMP[v6]_NEWDATA, but icmp[v6]_input reports ICMP[v6]_ECHOREPLY. This change lets icmp[v6]_input report report ICMP[v6]_NEWDATA to fix this issue and remove ICMP[v6]_ECHOREPLY to avoid the wrong usage in the future.
2019-11-27 08:09:51 -06:00
Xiang Xiao
250bde034d
net/: icmp[v6]_pollsetup should always return POLLWRNORM if the caller requests it since ICMP[v6] doesn't utilize IOB buffer for sending and always needs to wait for an ICMP[v6]_POLL.
2019-11-27 08:04:14 -06:00
Xiang Xiao
ea666877f2
net/devif/devif_callback.c: Restore cf9f2c56cb
. That restored change plus the following additional commits reolves the issue raised by Valmantas Palikša.
2019-11-27 07:59:52 -06:00
Gregory Nutt
93ed8b66d9
net/netlink: Add partial support for the NETLINK poll() operation. Still missing is some signal handling logic that actually wakes up the poll() when an asynchronous NETLLINK response is available.
...
So although the poll() implemenation is still not yet usable, the commit is useful because it (1) does not harm, and (2) incidentally fixes a few other issues in the NETLONK response queuing that I noted in the process.
2019-11-26 18:52:22 -06:00
Xiang Xiao
8214973f80
net/usrsock/usrsock_poll.c: usrsock_pollsetup() doesn't need logic and with fds->events since line 279 will do the same thing:
...
fds->revents &= (~(POLLOUT | POLLIN) | info->fds->events);
2019-11-25 11:44:58 -06:00
Xiang Xiao
1905e01fda
net/: ICMP/ICMPv6/TCP/UDP poll shouldn't set POLLHUP and POLLOUT at the same time the standard require that only report POLLHUP:
...
https://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html .
2019-11-25 09:59:50 -06:00
Xiang Xiao
34ec7c97eb
net/icmp/icmp_netpoll.c and icmpv6/icmpv6_netpoll.c: ICMP/ICMPv6 should always report POLLHUP and POLLERR, regardless of requested 'events'.
2019-11-25 09:57:49 -06:00
Xiang Xiao
af9c67ab58
net/tcp/tcp_netpoll.c and net/udp/udp_netpoll.c: In [tcp|udp]_iob_work fix the wrong condition logic (& vs &&).
2019-11-25 09:32:24 -06:00
Gregory Nutt
f1ffb300da
net/devif/devif_callback.c: This commit reverts the core of commit cf9f2c56cb
pending further investigation. Valmantas Palikša reports that this change cause timeout errors during pinging.
2019-11-25 07:34:41 -06:00
Xiang Xiao
506b83f8d9
net/inet/inet_close.c: In tcp_close_eventhandler(), check TCP_NEWDATA flag before process and don't eat the flag for TCP_DISCONN_EVENTS
2019-11-24 10:41:11 -06:00
Xiang Xiao
98fc60eb75
[tcp|udp]_poll_eventhandler check psock_[tcp|udp]_cansend before report POLLOUT. Change the unbuffered psock_[tcp|udp]_cansend return OK to unify the code logic and remove the unnecessary [tcp|udp]_poll_txnotify call.
2019-11-24 10:30:48 -06:00
Xiang Xiao
673f812c4e
net/tcp/tcp_netpoll.c: Monitor TCP_POLL/TCP_NEWDATA/TCP_BACKLOG per the request like UDP counterpart.
2019-11-24 10:20:01 -06:00
Xiang Xiao
893fc6e1cf
net/udp/udp_netpoll.c: Report POLLHUP and POLLERR in 'revents' regardless the requested 'events' set. Per Opengroup.org, these bits must be ignored in the 'events' set.
2019-11-24 10:18:08 -06:00
Xiang Xiao
cf9f2c56cb
et/devif/devif_callback.c: devif_event_trigger shouldn't return true if triggers & DEVPOLL_MASK equal zero()
2019-11-24 10:11:19 -06:00
Gregory Nutt
9efadaefc1
net/tcp: Be consistent with units of TIME_WAIT. Units were unspecified in tcp/Kconfig, but assumed to be in units of half seconds in tcp/timer.h. include/nuttx/netconfig does not indicate the units but is apparently assuming seconds. This commit unifies all delays to clearly specified units of seconds.
2019-11-24 09:19:54 -06:00
Xiang Xiao
e0307fcd8f
boards/sim/sim/sim/src/sim_bringup.c: Mount tmpfs to CONFIG_LIBC_TMPDIR in sim_bringup if CONFIG_FS_TMPFS is defined.
2019-11-23 07:58:50 -06:00
Gregory Nutt
bc8d964cb9
net/netlink: Add some comments about 'Input Parameters'
2019-11-19 20:46:43 -06:00
Gregory Nutt
b72f7cf47f
net/netlink/netlink_route.c: Fix a case where #if was used but #ifdef was intended.
2019-11-19 09:47:57 -06:00
Gregory Nutt
b659c74440
net/netlink/netlink_sockif.c: Netlink sockets may be set to non-blocking.
2019-11-19 07:50:46 -06:00
Gregory Nutt
936d69da1f
net/netlink and include/nuttx/net/netlink.h: Make netlink_add_response() a globally access part of the network interface. This is necesssary to support netlink components that reside outside of the net/ sandbox.
2019-11-18 21:12:50 -06:00
Gregory Nutt
a7a1b0888e
net/netlink/netlink_route.c: Remove dangling whitespace at the end of lines.
2019-11-18 10:47:35 -06:00
Gregory Nutt
6479775721
net/netlink/netlink_conn.c: Add support for asynchronous Netlink responses.
2019-11-18 09:48:14 -06:00
Gregory Nutt
ab78f0ca0a
include/netpacket/netlink.h: Backout some preliminary NETLINK_CRYPTO definitions. These are premature (but may come back).
2019-11-17 10:47:24 -06:00
Gregory Nutt
82a4111a2b
include/netpacket/netlink.h: Add definitions that will be needed for future NETLINK_CRYPTO support.
2019-11-14 09:18:11 -06:00
Gregory Nutt
9d6c607afc
net/netlink/netlink_route.c: Add some comments.
2019-11-12 10:36:05 -06:00
Gregory Nutt
3e1937b49b
net/netlink: Add options to disable individual NETLINK_ROUTE commands. This will probably become quite large and will need to be higher tunable for smaller platforms.
2019-11-12 10:19:42 -06:00
Gregory Nutt
3811a0f5cc
net/netlink/netlink_route.c: Update some comments.
2019-11-12 07:59:43 -06:00
Gregory Nutt
ecbd5a85d7
net/netlink: Fixes from testing with new apps/examples/netlink_route.
2019-11-11 13:38:11 -06:00
Gregory Nutt
71a968ad71
net/netlink/netlink_route.c: Add missing routing table list terminating response.
2019-11-10 15:00:05 -06:00
Gregory Nutt
3a8a829088
net/netlink/netlink_route.c: Add support for obtaining the entire routing table.
2019-11-10 14:11:44 -06:00
Gregory Nutt
bda0a9c6a7
net/netlink: Fix offset in rtattr. include/net/route.h: Correct form and naming of sruct rtentry. include/netpacket/netlink.h: Add some definitions that will be needed to access routing tables.
2019-11-10 12:35:15 -06:00
Gregory Nutt
8c85ecf531
net/netlink/netlink_route.c: Add support for the NETLINK_ROUTE RTM_GETLINK command that is used to obtain a list of all devices in the UP state.
2019-11-09 17:36:30 -06:00
Gregory Nutt
b6756eb5fe
Trivial update to some comments.
2019-11-08 12:06:29 -06:00
Gregory Nutt
dbbabcd33c
Squashed commit of the following:
...
net/netlink/netlink_route.c: Add Netlink socket NETLINK_ROUTE support for getting a snopshot of the Neighbor table.
net/neighbor/neighbor_snapshot.c: Add neighbor_snapshot() that will eventually be used by the Netlink sockets. Also fixed naming violation 'struct neighbor_entry' -> 'struct neighbor_entry_s'.
include/nuttx/net/neighbor.h: Expose format of the IPv6 neighbor table for use with Netlink sockets.
2019-11-08 11:16:04 -06:00
Gregory Nutt
d31411189e
net/netlink/Kconfig: Remove dependency on EXPERIMENTAL. Although the Netlink implementation is still only fragmentary, there is no usable functionality there and no reason for it to depend on EXPERIMENTAL. Also minor changes to the menu organization so that the Netlink options appear the same was as do other network options.
2019-11-07 14:10:35 -06:00
Gregory Nutt
38e527deeb
net/netlink: Fix cosmetic issues, mostly typo fixes.
2019-11-04 14:06:07 -06:00
Gregory Nutt
6d13705e93
net/netlink: The NETLINK_ROUTE logic needs to return the first queued response and not attempt to match up reponses with requests. That is the Linux compatible way. Also, use queue.h functions for list management and fix an error in arp_snapshot().
2019-11-04 09:02:14 -06:00
Gregory Nutt
7bd045130c
net/netlink/: Misc bugfixes from initial testing using NSH 'arp -t' command.
2019-11-03 19:27:58 -06:00
Gregory Nutt
2991987018
net/netlink/netlink_route.c (mostly): This completes a minimal netlink implementation that will retrieve the ARP table.
...
net/netlink: Add basic hooks (only) to support the NETLINK_ROUTE protocol.
2019-11-03 13:59:42 -06:00