Commit Graph

55 Commits

Author SHA1 Message Date
Gregory Nutt
2c95fef501 Remove some empty code section comments 2016-02-26 07:35:55 -06:00
Gregory Nutt
aa3e778dc6 nuttx/net: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section() 2016-02-14 08:38:44 -06:00
Gregory Nutt
7fb7bef2d2 Fix an error introduced with last IOB fix 2016-01-26 09:55:17 -06:00
Gregory Nutt
365e015010 iob_alloc_qentry() has the same issue that was recently fixed in iob_alloc() 2016-01-25 17:46:59 -06:00
Gregory Nutt
91b762aa86 Networking: Fix an error that I introduced with my last review changes 2016-01-22 17:35:06 -06:00
Andrew Webster
5c589e5b9c Net: use nlldbg since an iob can be added from an interrupt 2016-01-22 16:23:31 -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
e221777a7a TCP: post buffer semaphore before re-acquiring both
TCP uses two semaphores for buffers, one for the entire buffer pool,
and one for the number of allowed buffers for readahead.  To avoid
double taking a semaphore under heavy load, release the semaphore
after waiting before trying to acquire both again.
2016-01-22 16:15:10 -06:00
Gregory Nutt
af086c40ff Remove dangling whitespace 2015-10-04 15:28:54 -06:00
Gregory Nutt
0b12dbf95d Fix some spacing problems 2015-10-04 15:04:00 -06:00
Gregory Nutt
a7e43c7fdb Eliminate some warnings 2015-09-08 09:20:18 -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
Max Neklyudov
7d04104485 Networking: Allow receipt of empty UDP packets. From Max Neklyudov 2015-08-11 08:34:16 -06:00
Gregory Nutt
09c7373f24 Fix misc. compilation error/warning detected by tools/testbuild.sh 2015-07-01 14:33:37 -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
8a380a084d IOB Configuration: Default number of IOB changes must be more than zero is UDP read-ahead is enabled. 2015-02-10 06:25:55 -06:00
Gregory Nutt
c4bd6f52b5 Networking: The are issues with the TCP write-ahead buffering if CONFIG_NET_NOINTS is enabled: There is a possibility of deadlocks in certain timing conditions. I have not seen this with the Tiva driver that I have been users but other people claim to see the issue on other platforms. Certainly it is a logic error: The network should never wait for TCP read-ahead buffering space to be available. It should drop the packets immediately.
This was fixed by duplicating most of the IOB interfaces:  The versions that waited are still present (like iob_alloc()), but now there are non-waiting verisons of the same interfaces (like iob_tryalloc()).  The TCP read-ahead logic now uses only these non-waiting interfaces.
2015-01-27 21:23:42 -06:00
Gregory Nutt
1aa528a572 More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs. 2014-11-25 14:10:35 -06:00
Gregory Nutt
0abe6c66d7 Update everything under nuttx/net to use the corrected syslog interfaces 2014-10-08 10:48:11 -06:00
Gregory Nutt
4f60bfb485 IOB: Change suggested by Rony Xln 2014-07-08 07:13:50 -06:00
Gregory Nutt
178b2b0cbe NET: Important fix to the read-ahead buffer queue managment: Consumed bytes were being trimmed from the head of the queue, but the queue head itself was not being updated. From Rony XLN 2014-07-07 07:28:17 -06:00
Gregory Nutt
64c8dba8c4 NET: Create net/sockets directory and hook into the build/configuration system 2014-06-28 16:41:55 -06:00
Gregory Nutt
d6cf0f5703 Fix another place where sem_tryalloc may be called from the interrupt level. Thanks Manuel 2014-06-28 13:32:42 -06:00
Gregory Nutt
c3c8c86873 NET: Last tweaks were still in the editor 2014-06-28 11:56:48 -06:00
Gregory Nutt
3b81e58047 NET: Fix some errors in recent network I/O buffering when stack runs from interrupt level 2014-06-28 11:35:14 -06:00
Gregory Nutt
1a2bcebb4a Clean up some networking configuration menus 2014-06-25 11:01:08 -06:00
Gregory Nutt
f57024406a Clean up IGMP naming 2014-06-25 09:52:36 -06:00
Gregory Nutt
e2947c37a1 Forget to add a file in last commit 2014-06-24 15:46:10 -06:00
Gregory Nutt
fabcb6d37e TCP Read-Ahead: Convert to use I/O buffer chains 2014-06-24 15:38:00 -06:00
Gregory Nutt
e9a588c398 Add throttle support to the I/O buffer logic 2014-06-24 11:53:19 -06:00
Gregory Nutt
718d9993e6 TCP write buffering: This corrects some of the basic transfer problems. But there are more 2014-06-23 17:31:30 -06:00
Gregory Nutt
30843cf46d TCP write buffering: Add an offset to buffer dumping logic 2014-06-23 09:40:17 -06:00
Gregory Nutt
963f8f49c5 TCP write buffering: Add length to buffer dumping instrumentation 2014-06-23 07:31:55 -06:00
Gregory Nutt
6f1651d5f2 TCP write buffering: Extend and fix some buffer dumping logic 2014-06-22 18:53:18 -06:00
Gregory Nutt
d642616c5b TCP write buffering: Fix an error in the trim logic 2014-06-22 16:25:26 -06:00
Gregory Nutt
579935bfc1 TCP write buffering: Correct handling of retry counter 2014-06-22 15:27:01 -06:00
Gregory Nutt
356d25b503 First cut at conversion of write-buffering to use I/O buffer chaings (IOBs) 2014-06-22 11:27:57 -06:00
Gregory Nutt
b8840dc6de Cosmetic plus some configuration default changes 2014-06-12 13:32:07 -06:00
Gregory Nutt
96c6f34825 IOB: Remove private data. Not needed 2014-06-12 08:35:59 -06:00
Gregory Nutt
60306a16d7 IOB: remove flags 2014-06-09 13:54:47 -06:00
Gregory Nutt
893bded2e1 Those pesky carriage returns 2014-06-07 11:05:31 -06:00
Gregory Nutt
0f71ea26b1 IOB: Add iob_contig() 2014-06-07 11:01:13 -06:00
Gregory Nutt
a304a73608 IOB: Add queue handling interfaces; improve lists 2014-06-06 09:35:31 -06:00
Gregory Nutt
87917ae782 IOB: Minor improvement to trimhead 2014-06-06 06:23:13 -06:00
Gregory Nutt
fc9b45f39f IOB: Fix bugs in trimming logic 2014-06-05 18:50:30 -06:00
Gregory Nutt
6a83cc5d17 Add iob_freechain 2014-06-05 13:26:38 -06:00
Gregory Nutt
7ef0fb1460 IOB: Add iob_clone() 2014-06-05 12:56:00 -06:00
Gregory Nutt
d6c1f0e526 IOB: Fix typo in debug assertion 2014-06-05 11:45:55 -06:00
Gregory Nutt
cbb26a9991 IOB: More clean based on change of the last commit 2014-06-05 11:39:17 -06:00
Gregory Nutt
c92645017b IOB: Need to clone header when deleting the first entry in an I/O buffer chain 2014-06-05 11:19:00 -06:00