Commit Graph

1737 Commits

Author SHA1 Message Date
Gregory Nutt 27e4bfffd4 Update some comments and README files. 2019-08-24 13:06:43 -06:00
Anthony Merlino c024a1f569 Merged in antmerlino/nuttx/xbee-prefix (pull request #1009)
drivers/ieee802154/xbee: Add configuration option for setting the default prefix to use when bringing up the network and setting the IP address.

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-19 22:24:32 +00:00
Anthony Merlino 70404ed0dc Merged in antmerlino/nuttx/iobinstrumentation (pull request #1001)
Iobinstrumentation

* mm/iob: Introduces producer/consumer id to every iob call. This is so that the calls can be instrumented to monitor the IOB resources.

* iob instrumentation - Merges producer/consumer enumeration for simpler IOB user.

* fs/procfs: Starts adding support for /proc/iobinfo

* fs/procfs: Finishes first pass of simple IOB user stastics and /proc/iobinfo entry

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 22:42:25 +00:00
Anthony Merlino fc1780d63e Merged in antmerlino/nuttx/sixlowpan-removeconversions (pull request #997)
ieee802154/sixlowpan: Removes unnecessary conversions that were happening due to a misunderstanding of byte ordering with EUI-64

# Conflicts:
#	drivers/wireless/ieee802154/xbee/xbee_netdev.c

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-16 01:26:44 +00:00
Anthony Merlino 7c06438315 Merged in antmerlino/nuttx/ipforward (pull request #981)
net/ipforward: Check if interface is up early on when forwarding to avoid extra work.

As noticed in a previous wireless commit, when forwarding is enabled and a packet comes in, the packet is attempted to be sent on each other netdev without regard for whether it is in the UP state. Of course this is eventually caught, but it can be caught earlier to avoid unnecessary work, especially in the 6LoWPAN case where a useless packet conversion will occur.

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-08-10 17:53:06 +00:00
David Sidrane 1e90dd9284 net/socket/getpeername: Fixed warning in DEBUG code. 2019-08-07 07:53:56 -06:00
Juha Niskanen d5382cde17 net/udp/udp_psock_sendto_buffered.c: Fixes a copy-paste error in the new SO_LINGER code: CONFIG_TCP_NOTIFIER to CONFIG_UDP_NOTIFIER. 2019-08-05 07:42:14 -06:00
Nathan Hartman 68d43d3679 Fix typos. 2019-08-04 14:50:28 -06:00
David S. Alessio 20e8a83c5f net/udp/udp_txdrain.c: Add missing header file. 2019-07-29 08:12:55 -06:00
Gregory Nutt 124212624d net: Minor fix in error checking in TCP/UDP Tx drain logic 2019-07-28 07:39:55 -06:00
Gregory Nutt 361d85ae35 net/tcp and udp: Fix errors in the new implementation of SO_LINGER. The tcp_drain() and udp_drain() functions were casting the working argument to the wrong type, resulting in hangs and abnormal behavior. There is a complexity in the tcp drain logic when the remote peer closes the socket before all Tx data has been flushed. Sometimes we are not notified of this case and wait the entire timeout unnecessarily. There is a workaround in place in tcp_txdrain(), but this really should be revisited. 2019-07-27 10:26:52 -06:00
Masayuki Ishikawa 5fd5cc0b0a Merged in masayuki2009/nuttx.nuttx/change_udp_broadcast (pull request #954)
net/udp: Remove net stack dependency from CONFIG_NET_BROADCAST

This change allows us to use CONFIG_NET_BROADCAST without network
stack. (i.e. usrsock application can use broadcast)

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-26 14:05:03 +00:00
Bernd Walter 5d01ce6c58 net/icmpv6/icmpv6_autoconfig.c: Use ntohs() to convert IPv6 address from network to host order int network debug output. 2019-07-06 07:02:51 -06:00
Gregory Nutt 1346f29151 net/: Fix alignment and spacing problems found by tools/nxstyle. 2019-07-02 18:02:23 -06:00
Gregory Nutt 574595dc32 Still fixing new warnings found in build testing. 2019-07-01 15:56:34 -06:00
Gregory Nutt 8774977f4d Fix warnings found in build testing. 2019-07-01 15:22:42 -06:00
Gregory Nutt 077d164b14 /net/inet: Simplify design of change in last commit. 2019-07-01 14:07:12 -06:00
Gregory Nutt de5a6163d5 This commit implements a proper version of SO_LINGER. Not sufficiently tested on initial commit.
Squashed commit of the following:

    net/: Fix some naming inconsistencies, Fix final compilation issies.

    net/inet/inet_close():  Now that we have logic to drain the buffered TX data, we can implement a proper lingering close.

    net/inet,tcp,udp:  Add functions to wait for write buffers to drain.

    net/udp:  Add support for notification when the UDP write buffer becomes empty.

    net/tcp:  Add support for notification when the TCP write buffer becomes empty.
2019-07-01 12:25:32 -06:00
Gregory Nutt ded1900927 include/nuttx/net/net.h: Fix some long lines. 2019-07-01 09:18:38 -06:00
Gregory Nutt b0f751897c net/inet/inet_close.c: Extend some comments. 2019-07-01 08:24:39 -06:00
Gregory Nutt 5e36627366 Update TODO list and fix an error in conditional compilation that I introduced with the last commit. 2019-07-01 08:12:51 -06:00
Gregory Nutt 5af5fc4409 net/inet/inet_close.c: Last PR remove SO_LINGER socket option. SO_LINGER was always enabled is CONFIG_NET_SOLINGER was selected. 2019-07-01 07:37:41 -06:00
Masayuki Ishikawa ed9fe70024 Merged in masayuki2009/nuttx.nuttx/fix_tcp_active_close (pull request #923)
net/inet: Fix tcp active close in inet_close.c

In previous implementation, FIN packet was not sent when a socket
is actively closed (e.g. telnetd or webserver) without SO_LINGER.
This issue happens because the socket closing sequence waits for
the status.cl_sem only if lingering timeout is set. However,
in many server use-cases, SO_LINGER is not usually set and even
in these cases, FIN packet must be sent correctly.

This PR changes the logic in inet_close.c so that it can wait
for status.cl_sem regardless of SO_LINGER. Instead, if SO_LINGER
is set, it waits for the semaphore with timeout option.

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-07-01 13:25:47 +00:00
Gregory Nutt d0c569d7b5 net/tcp/tcp_send_buffered.c: Fix a warning reported in build testing. 2019-06-21 13:48:27 -06:00
Juha Niskanen abc49a6a13 arch/arm/src/stm32l4: if SRAM3 is used as heap, do not power it off in stop 2 mode. 2019-06-13 05:52:40 -06:00
Gregory Nutt ee9e8c6bc2 udp\udp_callback.c: Fix another C89 compatibility problem. Empty initializers are not permitted. Caused ez80 build failure. 2019-06-03 09:23:19 -06:00
Masayuki Ishikawa fd387b6b8c Merged in masayuki2009/nuttx.nuttx/fix_usrsock (pull request #879)
net/usrsock: Fix debug logs and remove DEBUGASSERT from usrsockdev_do_request()

In a client mode, socket() will be the first request for usrsockdev_do_request().
However, in a server mode, the first request to accepted sockets will be recv()
or others which depend on applications. So I think we should remove this
DEBUGASSERT from usrsockdev_do_request().

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

Approved-by: Gregory Nutt <gnutt@nuttx.org>
2019-06-03 11:43:43 +00:00
Gregory Nutt 2cf195e6d1 configs: Fix included path used in all arch/z80 XDS-II builds (ez80 and z8). 2019-06-02 16:16:44 -06:00
Gregory Nutt 2767e80459 Squashed commit of the following:
ez80:  Fixing a few more compile problems.  I am afraid that the 5.3.0 compiler it too buggy to use.
    ez80:  Additional build-related fixed.
    eZ80:  Updating to use the newest ZDSII 5.3.0 toolchain.
2019-06-02 11:05:31 -06:00
Valmantas Paliksa d3cedfb823 net/tcp/tcp_send_buffered.c: Fix deadlock in iob_copyin when iob buffers are exhausted and network lock is taken. 2019-05-31 07:29:17 -06:00
Gregory Nutt b49be4bb20 Squashed commit of the following:
arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
2019-05-21 18:57:54 -06:00
Ivan Ucherdzhiev 82cb456e02 net/sixlowpan/sixlowpan_hc06.c: Correct an endian-ness problem in HC06 decompression. 2019-05-08 06:59:22 -06:00
Jukka Laitinen 285fb555d0 net/socket/getsockname.c: Fix addrlen check in socket debug features. Getsockname checked erroneously a pointer agains 0, where the intention was to dereference the pointer and to check the length. This causes also a compilation failure if the code is compiled with CONFIG_DEBUG_FEATURES and with -Werror flag set. 2019-04-30 06:22:07 -06:00
Gregory Nutt c999d12bba net/utils: net_lock() and net_restorelock() not return a value. That values is the standard zero on success; negated errno value on failure. This return value is only needed for -ECANCELED. That cancellation indication needs to ripple all the way back to the highest levels where the cancellation can be acted on. This commit only adds the return value; it does not add checking for the return values of net_lock() and net_restorelock() at higher levels. That is required too. 2019-04-14 09:37:25 -06:00
Gregory Nutt d701dc6a4a net/dev/devif_poll.c: Fix compile error introduced by c9b73f5139. Typo: DEVIF_ICMP6, not DEVIF_ICMPV6. 2019-03-19 16:46:11 -06:00
zhangyuan7 81a3ec250e net/local: Fixed deadlock issue by replacing nxsem_wait() with net_lockedwait() so that we do not wait with the network locked. 2019-03-19 09:54:22 -06:00
zhangyuan7 656c20fd4a net/local/local_connect.c: Initialize lc_result before giving lc_waitsem 2019-03-19 09:52:40 -06:00
anchao a418b63e07 net/udp/udp_callback.c: Initialize address structure to avoid random values in padding. 2019-03-19 09:49:54 -06:00
anchao c9b73f5139 net/icmp and icmpv6: Bind icmp callback from device to connection. Resolves the issue that bind() could not be called before send() 2019-03-19 09:43:32 -06:00
zhangyuan7 b161682adc net/usrsock: Add mutual exclusion so that only user can perform a socket request 2019-03-19 09:23:08 -06:00
Gregory Nutt ba859ad302 tools/nxstyle.c: Don't complain about certain lowercase characters in otherwise uppercase pre-processor identifers: IPv6, IPv4, ICMPv6, IGMPv2, p as a decimal point, d signifying a divisor. It was a bad idea to let the door open a crack for there. While they improve readability, the inconsistently also causes other problems. 2019-03-12 14:22:52 -06:00
Gregory Nutt f6b00e1966 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
Gregory Nutt a76e137ce2 Squashed commit of the following:
sched/init/nx_start.c:  Add support for CONFIG_BOARD_DRIVER_INITIALIZE.  If this option is selected then nx_start() will call a board-provided function board_driver_initialize() immediately after calling up_initialize().

    Rename CONFIG_BOARD_INITIALIZE to CONFIG_BOARD_LATE_INITIALIZE.

    Raname board_initialize() to board_late_initialize()
2019-02-18 15:32:00 -06:00
Gregory Nutt 69056d4053 net/: The value ERROR should never be returned from internal OS functions. That is reserved for returning values to appliations with the errno value set. Within the OS, errors are returned with a negated errno value ALWAYS. 2019-02-14 15:38:36 -06:00
Gregory Nutt 359753adee net/tcp/tcp_send_buffered.c: Fix assertion crash when window size is zero. 2019-02-14 08:39:16 -06:00
Gregory Nutt 0bc800d71f net/tcp/tcp.h: Fix a muffed edit to conditional found in build testing. 2019-02-11 15:54:31 -06:00
Gregory Nutt efe65749ce Fix condition logic: The setup seems to support a network without sockets. That is not the case.
Squashed commit of the following:

    sched/sched/sched_getsockets.c:  Fix an error in conditional compilation.
    fs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NSOCKET_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    syscall/:  Remove all conditional logic based on CONFIG_NSOCKET_DESCRIPTORS == 0
    tools/:  Fixups for CONFIG_NSOCKET_DESCRIPTORS no longer used to disable sockets.
2019-02-11 15:47:25 -06:00
Gregory Nutt 0cb1c2c0b6 configs/sama5d2-xult: Move console from FLEXCOM4 to UART1. FLEXCOM4 does not work for the Arduino serial. UART1 is used with the VCOM provided by the EDBG. 2019-02-11 14:55:18 -06:00
Gregory Nutt 1a158a184e Fix missing #endif in found in build testing. 2019-02-11 13:31:53 -06:00
Gregory Nutt a64869aa67 CONFIG_NFILE_DESCRIPTORS=0 can no longer be used to disable the file system. NuttX with no file system does not make sense.
Squashed commit of the following:

    configs/:  The few configurations that formerly set CONFIG_NFILE_DESCRIPTORS=0 should not default, rather they should set the number of descriptors to 3.
    fs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    tools/:  Tools updates for changes to usage of CONFIG_NFILE_DESCRIPTORS.
    syscall/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    libs/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    include/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    drivers/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    Documentation/:  Remove all references to CONFIG_NFILE_DESCRIPTORS == 0
    binfmt/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    arch/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    net/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/:  Remove all conditional logic based on CONFIG_NFILE_DESCRIPTORS == 0
    sched/Kconfig:  CONFIG_NFILE_DESCRIPTORS may no longer to set to a value less than 3
    configs/:  Remove all settings for CONFIG_NFILE_DESCRIPTORS < 3
2019-02-11 12:09:26 -06:00