Print this page
5295 remove maxburst logic from TCP's send algorithm Reviewed by: Dan McDonald <danmcd@omniti.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/tcp/tcp_input.c
          +++ new/usr/src/uts/common/inet/tcp/tcp_input.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  24   24   * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  25   25   * Copyright (c) 2011 Joyent, Inc. All rights reserved.
       26 + * Copyright (c) 2014 by Delphix. All rights reserved.
  26   27   */
  27   28  
  28   29  /* This file contains all TCP input processing functions. */
  29   30  
  30   31  #include <sys/types.h>
  31   32  #include <sys/stream.h>
  32   33  #include <sys/strsun.h>
  33   34  #include <sys/strsubr.h>
  34   35  #include <sys/stropts.h>
  35   36  #include <sys/strlog.h>
↓ open down ↓ 2601 lines elided ↑ open up ↑
2637 2638  
2638 2639                          /*
2639 2640                           * If SYN was retransmitted, need to reset all
2640 2641                           * retransmission info.  This is because this
2641 2642                           * segment will be treated as a dup ACK.
2642 2643                           */
2643 2644                          if (tcp->tcp_rexmit) {
2644 2645                                  tcp->tcp_rexmit = B_FALSE;
2645 2646                                  tcp->tcp_rexmit_nxt = tcp->tcp_snxt;
2646 2647                                  tcp->tcp_rexmit_max = tcp->tcp_snxt;
2647      -                                tcp->tcp_snd_burst = tcp->tcp_localnet ?
2648      -                                    TCP_CWND_INFINITE : TCP_CWND_NORMAL;
2649 2648                                  tcp->tcp_ms_we_have_waited = 0;
2650 2649  
2651 2650                                  /*
2652 2651                                   * Set tcp_cwnd back to 1 MSS, per
2653 2652                                   * recommendation from
2654 2653                                   * draft-floyd-incr-init-win-01.txt,
2655 2654                                   * Increasing TCP's Initial Window.
2656 2655                                   */
2657 2656                                  tcp->tcp_cwnd = tcp->tcp_mss;
2658 2657                          }
↓ open down ↓ 1174 lines elided ↑ open up ↑
3833 3832  
3834 3833                  /*
3835 3834                   * If SYN was retransmitted, need to reset all
3836 3835                   * retransmission info as this segment will be
3837 3836                   * treated as a dup ACK.
3838 3837                   */
3839 3838                  if (tcp->tcp_rexmit) {
3840 3839                          tcp->tcp_rexmit = B_FALSE;
3841 3840                          tcp->tcp_rexmit_nxt = tcp->tcp_snxt;
3842 3841                          tcp->tcp_rexmit_max = tcp->tcp_snxt;
3843      -                        tcp->tcp_snd_burst = tcp->tcp_localnet ?
3844      -                            TCP_CWND_INFINITE : TCP_CWND_NORMAL;
3845 3842                          tcp->tcp_ms_we_have_waited = 0;
3846 3843                          tcp->tcp_cwnd = mss;
3847 3844                  }
3848 3845  
3849 3846                  /*
3850 3847                   * We set the send window to zero here.
3851 3848                   * This is needed if there is data to be
3852 3849                   * processed already on the queue.
3853 3850                   * Later (at swnd_update label), the
3854 3851                   * "new_swnd > tcp_swnd" condition is satisfied
↓ open down ↓ 148 lines elided ↑ open up ↑
4003 4000                                   * Be careful about the invisible FIN byte.
4004 4001                                   */
4005 4002                                  if ((tcp->tcp_valid_bits & TCP_FSS_VALID) &&
4006 4003                                      (tcp->tcp_unsent == 0)) {
4007 4004                                          tcp->tcp_rexmit_max = tcp->tcp_fss;
4008 4005                                  } else {
4009 4006                                          tcp->tcp_rexmit_max = tcp->tcp_snxt;
4010 4007                                  }
4011 4008  
4012 4009                                  /*
4013      -                                 * Do not allow bursty traffic during.
4014      -                                 * fast recovery.  Refer to Fall and Floyd's
4015      -                                 * paper "Simulation-based Comparisons of
4016      -                                 * Tahoe, Reno and SACK TCP" (in CCR?)
4017      -                                 * This is a best current practise.
4018      -                                 */
4019      -                                tcp->tcp_snd_burst = TCP_CWND_SS;
4020      -
4021      -                                /*
4022 4010                                   * For SACK:
4023 4011                                   * Calculate tcp_pipe, which is the
4024 4012                                   * estimated number of bytes in
4025 4013                                   * network.
4026 4014                                   *
4027 4015                                   * tcp_fack is the highest sack'ed seq num
4028 4016                                   * TCP has received.
4029 4017                                   *
4030 4018                                   * tcp_pipe is explained in the above quoted
4031 4019                                   * Fall and Floyd's paper.  tcp_fack is
↓ open down ↓ 179 lines elided ↑ open up ↑
4211 4199                          tcp->tcp_dupack_cnt = 0;
4212 4200                          /*
4213 4201                           * Restore the orig tcp_cwnd_ssthresh after
4214 4202                           * fast retransmit phase.
4215 4203                           */
4216 4204                          if (tcp->tcp_cwnd > tcp->tcp_cwnd_ssthresh) {
4217 4205                                  tcp->tcp_cwnd = tcp->tcp_cwnd_ssthresh;
4218 4206                          }
4219 4207                          tcp->tcp_rexmit_max = seg_ack;
4220 4208                          tcp->tcp_cwnd_cnt = 0;
4221      -                        tcp->tcp_snd_burst = tcp->tcp_localnet ?
4222      -                            TCP_CWND_INFINITE : TCP_CWND_NORMAL;
4223 4209  
4224 4210                          /*
4225 4211                           * Remove all notsack info to avoid confusion with
4226 4212                           * the next fast retrasnmit/recovery phase.
4227 4213                           */
4228 4214                          if (tcp->tcp_snd_sack_ok) {
4229 4215                                  TCP_NOTSACK_REMOVE_ALL(tcp->tcp_notsack_list,
4230 4216                                      tcp);
4231 4217                          }
4232 4218                  } else {
↓ open down ↓ 40 lines elided ↑ open up ↑
4273 4259                          if (SEQ_LEQ(seg_ack, tcp->tcp_rexmit_max)) {
4274 4260                                  if (SEQ_GT(seg_ack, tcp->tcp_rexmit_nxt)) {
4275 4261                                          tcp->tcp_rexmit_nxt = seg_ack;
4276 4262                                  }
4277 4263                                  if (seg_ack != tcp->tcp_rexmit_max) {
4278 4264                                          flags |= TH_XMIT_NEEDED;
4279 4265                                  }
4280 4266                          } else {
4281 4267                                  tcp->tcp_rexmit = B_FALSE;
4282 4268                                  tcp->tcp_rexmit_nxt = tcp->tcp_snxt;
4283      -                                tcp->tcp_snd_burst = tcp->tcp_localnet ?
4284      -                                    TCP_CWND_INFINITE : TCP_CWND_NORMAL;
4285 4269                          }
4286 4270                          tcp->tcp_ms_we_have_waited = 0;
4287 4271                  }
4288 4272          }
4289 4273  
4290 4274          TCPS_BUMP_MIB(tcps, tcpInAckSegs);
4291 4275          TCPS_UPDATE_MIB(tcps, tcpInAckBytes, bytes_acked);
4292 4276          tcp->tcp_suna = seg_ack;
4293 4277          if (tcp->tcp_zero_win_probe != 0) {
4294 4278                  tcp->tcp_zero_win_probe = 0;
↓ open down ↓ 1528 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX