Gregory Nutt
2a751068e6
Without lowsyslog() *llerr() is not useful. Eliminate and replace with *err().
2016-06-20 12:44:38 -06:00
Gregory Nutt
43eb04bb8f
Without lowsyslog() *llinfo() is not useful. Eliminate and replace with *info().
2016-06-20 11:59:15 -06:00
Gregory Nutt
d40a473f72
Without lowsyslog() *llwarn() is not useful. Eliminate and replace with *warn().
2016-06-20 09:37:08 -06:00
Gregory Nutt
2b445ddccc
Remove lowsyslog(). The new syslog() includes all of the functionality of lowsyslog(). No longer any need for two interfaces.
2016-06-20 08:57:08 -06:00
Jakub Łągwa
338b915008
While working with version 7.10 I discovered a problem in TCP stack that could be observed on high network load. Generally speaking, the problem is that RST flag is set in unnecessary case, in which between loss of some TCP packet and its proper retransmission, another packets had been successfully sent. The scenario is as follows: NuttX did not receive ACK for some sent packet, so it has been probably lost somewhere. But before its retransmission starts, NuttX is correctly issuing next TCP packets, with sequence numbers increasing properly. When the retransmission of previously lost packet finally succeeds, tcp_input receives the accumulated ACK value, which acknowledges also the packets sent in the meantime (i.e. between unsuccessful sending of lost packet and its proper retransmission). However, variable unackseq is still set to conn->isn + conn->sent, which is truth only if no further packets transmission occurred in the meantime. Because of incorrect (in such specific case) unackseq value, few lines further condition if (ackseq <= unackseq)is not met, and, as a result, we are going to reset label.
2016-06-20 06:55:29 -06:00
Gregory Nutt
7d0950bb22
net/: Change some nerr() ERRORS to nwarn() WARNINGS. Anomolous network events are not errors.
2016-06-12 07:09:37 -06:00
Gregory Nutt
f4fcdcdb4d
net/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
2016-06-11 17:37:21 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
e99301d7c2
Rename *lldbg to *llerr
2016-06-11 14:55:27 -06:00
Gregory Nutt
86b79b33cf
Reserver the name 'err' for other purposes
2016-06-11 14:40:07 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
c98f00a93b
Update comments; trivial addtion to a document.
2016-06-10 09:36:59 -06:00
Gregory Nutt
4f208600aa
Replace confusing references to uIP with just 'the network'
2016-05-30 09:31:44 -06:00
Gregory Nutt
2dd9777c7e
Fix a backward conditional test introduced with the last commit
2016-03-20 09:58:07 -06:00
Gregory Nutt
00b44959ea
TCP poll: TCP poll events can really only being processed when the poll from the correct device is received.
2016-03-20 08:39:15 -06:00
Gregory Nutt
4639cdd894
TCP timeouts: Fix some logic when there are multiple network interfaces. In this case, TCP timeout events can really only being processed when the poll from the correct device is received.
2016-03-20 08:19:00 -06:00
Gregory Nutt
2c95fef501
Remove some empty code section comments
2016-02-26 07:35:55 -06:00
Gregory Nutt
8db55f6493
Back out most of previous commit
2016-02-26 06:45:37 -06:00
Gregory Nutt
0b441ff1f4
net/: Add basic IEEE 802.15-4 socket support
2016-02-25 14:01:22 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -06:00
Andrew Webster
49e5cc5a6f
TCP: check for an active connection before cleaning it up
...
If there is no active connection (e.g. it is waiting in accept), then
the connection object, which doesn't yet exist, should not be cleaned
up when the socket is closed.
2016-01-22 16:22:09 -06:00
Andrew Webster
5e3023bef1
TCP: return from write when there is no buffer space
...
During a write, if there is no more buffer space for the user data,
return the amount that was written instead of waiting until there
is free space. If nothing has been written yet, then block as before.
This solves a deadlock that occurs if the user data is too large to
fit in the available buffer: the write thread will block before any
data is added to the write queue, leaving no possibility that more
buffers will free up when they are ACKed (since they have not yet been
sent). The write thread will then block forever and hold all of the
buffers.
2016-01-22 16:19:20 -06:00
Andrew Webster
cdd187a7f3
TCP: check for sndcb before using it
2016-01-22 15:54:45 -06:00
Andrew Webster
df211ee46a
TCP: add writable check during poll
...
When a poll requesting POLLOUT happens, the poll should return
immediately if a write will not block. This change adds that, as
opposed to the old behaviour of blocking until a timer from the
Ethernet driver eventually triggers the poll to complete.
This is only implemented for buffered TCP. Unbuffered TCP should
behave as before.
2016-01-22 15:52:14 -06:00
Andrew Webster
99f5fcda70
iTCP: use lowlevel syslog to avoid infinte recursion
...
If stdout is a socket (e.g. telnet), then the debug message will cause
more TCP data to be sent, which generates another message, and so on
2016-01-22 15:41:48 -06:00
Gregory Nutt
f348e68069
Update to use 64-bit timer when available
2016-01-21 11:54:26 -06:00
Gregory Nutt
6209c51206
net/: More clean-up of spacing/alignment issues
2015-10-08 15:10:04 -06:00
Gregory Nutt
0b12dbf95d
Fix some spacing problems
2015-10-04 15:04:00 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Gregory Nutt
d700793077
Fix a compile error when IPv6 is enabled
2015-09-07 16:34:25 -06:00
Alan Carvalho de Assis
f10a103108
Fix tcp_send_unbuffered when NET_ETHERNET is not defined.
2015-09-07 13:31:35 -06:00
Gregory Nutt
9c66bde5b0
Fix typo in pre-processor command noted by Pierre-noel Bouteville. Also move # of pre-processior command to column 1
2015-09-05 09:10:48 -06:00
Gregory Nutt
14297afb83
Cosmetic fix to break up long line
2015-09-03 07:33:50 -06:00
Gregory Nutt
36f4d0e9fc
Fix a error in some comments
2015-09-02 20:03:28 -06:00
Gregory Nutt
0e2986f131
net/tcp: The logic that binds a specific networkd device to a connection was faulty for the case of multiple network devices. On bind(), the local address should be used to associate a device with the connection (if the local address is not INADDR_ANY); On connect(), the remote address should be used (in case the local address is INADDR_ANY). On accept(), it does not matter but the remote address is the one guarenteed to be available.
2015-09-02 19:48:31 -06:00
Gregory Nutt
9fcad39a45
Trivial typo fix
2015-09-02 10:09:33 -06:00
Gregory Nutt
63071a563a
Costmetic changes
2015-08-27 10:38:43 -06:00
Gregory Nutt
b1e09d4847
net/socket and net/tcp: Fix a problem in whent there are multiple network devices. Polls were being sent to all TCP sockets before. This is not good because it means that packets may sometimes be sent out on the wrong device. That is inefficient because it will cause retransmissions and bad performance. But, worse, when one of the devices is not Ethernet, it will have a different MSS and, as a result, incorrect data transfers can cause crashes. The fix is to lock into a single device once the MSS is locked locked down.
2015-08-27 09:06:46 -06:00
Gregory Nutt
3bcdb218ff
Networking: Get rid of the tcp_mss macro. It is confusing and only obfuscates what is really going on
2015-08-27 08:39:17 -06:00
Gregory Nutt
007aabc46f
Fix a badly formatted comment
2015-08-26 19:18:04 -06:00
Anton D. Kachalov
b125c36849
Field `d_sndlen' is unsigned. It is always >= 0.
...
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-08-26 00:16:52 +03:00
SaeHie Park
e983e547e1
Networking: Correct return value from psock_tcp_accept(). From SaeHie Park
2015-08-25 07:15:21 -06:00
Gregory Nutt
342f5fe33d
Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation
2015-06-28 08:08:57 -06:00
Gregory Nutt
8f7752d956
Networking: Modify how callback structures are stored to avoid another potential use of a stal pointer.
2015-06-03 08:11:57 -06:00
Gregory Nutt
33085cb309
Networking: The network device list was protected by a re-entrant semaphore. With the recent change to support network device callback, the network stack needs to access the network device list too. Some drivers, however, run the network stack from the interrupt level -- this is bad but a fact in the current state. Of course,those drivers are unable to take the semaphore and will assert.
...
The solution here is to eliminate the device devices semaphore altogether. This eliminates netdev_semtake() and netdev_semgive() and replaces them with net_lock() and net_unlock() which have larger scope as needed for this purpose.
2015-05-31 08:34:03 -06:00
Gregory Nutt
6687e156e6
Revamp last change. IFF_UP only required when allocating callback, not freeing.
2015-05-30 21:13:58 -06:00
Gregory Nutt
8b029fbbee
TCP networking: Hook the network monitor into the device event notification logic
2015-05-30 11:29:47 -06:00
Gregory Nutt
933b95ac80
Forgot to add a file in the last commit
2015-05-30 09:17:46 -06:00
Gregory Nutt
04a661a97c
TCP networking: Add support for network driver events
2015-05-30 09:12:27 -06:00