Permalink
Browse files

Added configurable split threshold to tcp

  • Loading branch information...
2 parents d7c7f11 + cc81ede commit a3dbd7988c0d9171341306609da75336dd3c23fd @davelxmos davelxmos committed May 9, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 module_xtcp/src/uip/uip/uip-split.c
@@ -52,6 +52,10 @@
#include <xclib.h>
#define BUF ((struct uip_tcpip_hdr *)&uip_buf[UIP_LLH_LEN])
+#ifndef UIP_PACKET_SPLIT_THRESHOLD
+#define UIP_PACKET_SPLIT_THRESHOLD ((UIP_BUFSIZE) / 2)
+#endif
+
/*-----------------------------------------------------------------------------*/
@@ -88,9 +92,8 @@ uip_split_output(chanend mac_tx)
{
u16_t tcplen, len1, len2;
- /* We only try to split maximum sized TCP segments. */
if (BUF->proto == UIP_PROTO_TCP) {
- if (uip_len + UIP_TCPIP_HLEN > (UIP_BUFSIZE) / 2) {
+ if (uip_len + UIP_TCPIP_HLEN > UIP_PACKET_SPLIT_THRESHOLD) {
tcplen = uip_len - UIP_TCPIP_HLEN - UIP_LLH_LEN;
/* Split the segment in two, making sure the first segment is an

0 comments on commit a3dbd79

Please sign in to comment.