Overall tcp performance improvements (VPP-846)
[vpp.git] / src / vnet / tcp / tcp_newreno.c
index c66250e..c825e95 100644 (file)
@@ -18,7 +18,6 @@
 void
 newreno_congestion (tcp_connection_t * tc)
 {
-  tc->prev_ssthresh = tc->ssthresh;
   tc->ssthresh = clib_max (tcp_flight_size (tc) / 2, 2 * tc->snd_mss);
 }
 
@@ -47,7 +46,8 @@ newreno_rcv_cong_ack (tcp_connection_t * tc, tcp_cc_ack_t ack_type)
 {
   if (ack_type == TCP_CC_DUPACK)
     {
-      tc->cwnd += tc->snd_mss;
+      if (!tcp_opts_sack_permitted (tc))
+       tc->cwnd += tc->snd_mss;
     }
   else if (ack_type == TCP_CC_PARTIALACK)
     {