From 92beddd72f8e4a942dd832c448f405bf321e6cfa Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sat, 6 Mar 2010 11:55:00 +0000 Subject: [PATCH] task #7013 (Create option to have all packets delivered to netif->output in one piece): Always copy to try to create single pbufs in tcp_write. --- CHANGELOG | 5 +++++ src/core/tcp_out.c | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 78301051..7e218d9d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,6 +13,11 @@ HISTORY ++ New features: + 2010-03-06: Simon Goldschmidt + * tcp_out.c: task #7013 (Create option to have all packets delivered to + netif->output in one piece): Always copy to try to create single pbufs + in tcp_write. + 2010-03-06: Simon Goldschmidt * api.h, api_lib.c, sockets.c: task #10167 (sockets: speed up TCP recv by not allocating a netbuf): added function netconn_recv_tcp_pbuf() diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index 25ec95b2..6f244736 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -241,6 +241,11 @@ tcp_write(struct tcp_pcb *pcb, const void *arg, u16_t len, u8_t apiflags) u16_t oversize_used = 0; #endif /* TCP_OVERSIZE */ +#if LWIP_NETIF_TX_SINGLE_PBUF + /* Always copy to try to create single pbufs for TX */ + apiflags |= TCP_WRITE_FLAG_COPY; +#endif /* LWIP_NETIF_TX_SINGLE_PBUF */ + LWIP_DEBUGF(TCP_OUTPUT_DEBUG, ("tcp_write(pcb=%p, data=%p, len=%"U16_F", apiflags=%"U16_F")\n", (void *)pcb, arg, len, (u16_t)apiflags)); /* connection is in invalid state for data transmission? */