lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-devel] Minshall's algorithm


From: Shahar Klein
Subject: Re: [lwip-devel] Minshall's algorithm
Date: Thu, 22 Mar 2012 05:32:16 -0700 (PDT)



diff -ru lwip-1.4.0/src/core/tcp.c lwip-1.4.0-minshall/src/core/tcp.c
--- lwip-1.4.0/src/core/tcp.c   2011-05-06 11:51:25.000000000 +0300
+++ lwip-1.4.0-minshall/src/core/tcp.c  2012-03-22 13:04:17.000000000 +0200
@@ -1228,6 +1228,7 @@
     pcb->lastack = iss;
     pcb->snd_lbb = iss;
     pcb->tmr = tcp_ticks;
+    pcb->snd_sml = 0;

     pcb->polltmr = 0;

diff -ru lwip-1.4.0/src/core/tcp_out.c lwip-1.4.0-minshall/src/core/tcp_out.c
--- lwip-1.4.0/src/core/tcp_out.c       2011-05-06 11:51:25.000000000 +0300
+++ lwip-1.4.0-minshall/src/core/tcp_out.c      2012-03-22 12:58:34.000000000 +0200
@@ -961,9 +961,16 @@
      *   RST is no sent using tcp_write/tcp_output.
      */
     if((tcp_do_output_nagle(pcb) == 0) &&
-      ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)){
-      break;
+            ((pcb->flags & (TF_NAGLEMEMERR | TF_FIN)) == 0)){
+        if ( pcb->unacked &&  pcb->snd_sml > pcb->unacked->len) {
+            break;
+        }
+        else {
+            pcb->snd_sml = pcb->unsent? pcb->unsent->len : 0 + pcb->unsent->len;
+        }
     }
+
+
 #if TCP_CWND_DEBUG
     LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_output: snd_wnd %"U16_F", cwnd %"U16_F", wnd %"U32_F", effwnd %"U32_F", seq %"U32_F", ack %"U32_F", i %"S16_F"\n",
                             pcb->snd_wnd, pcb->cwnd, wnd,
diff -ru lwip-1.4.0/src/include/lwip/tcp.h lwip-1.4.0-minshall/src/include/lwip/tcp.h
--- lwip-1.4.0/src/include/lwip/tcp.h   2011-05-06 11:51:26.000000000 +0300
+++ lwip-1.4.0-minshall/src/include/lwip/tcp.h  2012-03-22 13:01:14.000000000 +0200
@@ -231,6 +231,8 @@
 #define TCP_SNDQUEUELEN_OVERFLOW (0xffffU-3)
   u16_t snd_queuelen; /* Available buffer space for sending (in tcp_segs). */

+  u32_t snd_sml; /* Maintain state for minshall's algorithm */
+
 #if TCP_OVERSIZE
   /* Extra bytes available at the end of the last pbuf in unsent. */
   u16_t unsent_oversize;




From: Shahar Klein <address@hidden>
To: "address@hidden" <address@hidden>
Sent: Thursday, March 22, 2012 1:19 PM
Subject: [lwip-devel] Minshall's algorithm

Hi
Testing lwip with netperf TCP_RR and message size of 1461 result with very low transmission rate.
Disabling Nagle showed normal results...
I think it's the combination of Nagle and Delayed-ack described here:
http://ietfreport.isoc.org/idref/draft-minshall-nagle/ 

Attached a suggestion to enable Minshall's. 
What do you think?

10x ahead
Shahar Klein


_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]