summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-06-22 13:34:09 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-06-22 13:34:09 -0600
commit1c8253772e4a162a3c5faa755745dc3b7fccf6db (patch)
tree98bff7da3b95089ae531c8907887b7acc24b0cc9
parent0c72d9900e00e06e9c9b1008e795766011a9c46f (diff)
downloadnuttx-1c8253772e4a162a3c5faa755745dc3b7fccf6db.tar.gz
nuttx-1c8253772e4a162a3c5faa755745dc3b7fccf6db.tar.bz2
nuttx-1c8253772e4a162a3c5faa755745dc3b7fccf6db.zip
Net: First bug fixes for modified write buffer logic
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/net/net_send_buffered.c3
-rw-r--r--nuttx/net/net_sockets.c6
3 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index e9b61b389..fcccfd40f 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -7461,4 +7461,7 @@
* tools/mkfsdata.pl: Apparently, the trailing the 0x00 in http server
files is seen as a bug in javascript and images. From Max/Himax
(2014-6-19).
+ * net/ and include/nutt/net (many files): Conversion of the TCP
+ write buffering logic to use I/O buffer chains (not tested on initial
+ check-in) (2014-6-22).
diff --git a/nuttx/net/net_send_buffered.c b/nuttx/net/net_send_buffered.c
index 87f3d61d0..1584be800 100644
--- a/nuttx/net/net_send_buffered.c
+++ b/nuttx/net/net_send_buffered.c
@@ -665,7 +665,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
}
else
{
- FAR struct tcp_wrbuffer_s *wrb = tcp_wrbuffer_alloc();
+ FAR struct tcp_wrbuffer_s *wrb;
/* Set up the callback in the connection */
@@ -690,6 +690,7 @@ ssize_t psock_send(FAR struct socket *psock, FAR const void *buf, size_t len,
*/
sq_addlast(&wrb->wb_node, &conn->write_q);
+ nvdbg("Queued WRB=%p pktlen=%d\n", wrb, WRB_PKTLEN(wrb));
/* Notify the device driver of the availability of TX data */
diff --git a/nuttx/net/net_sockets.c b/nuttx/net/net_sockets.c
index 5b3581c86..488531356 100644
--- a/nuttx/net/net_sockets.c
+++ b/nuttx/net/net_sockets.c
@@ -105,6 +105,12 @@ void net_initialize(void)
uip_initialize();
+ /* Initialize I/O buffering */
+
+#ifdef CONFIG_NET_IOB
+ iob_initialize();
+#endif
+
#ifdef CONFIG_NET_ROUTE
/* Initialize the routing table */