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