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