per Tom Skibo, remove experimental SACK options code
authorAndrew Cherenson <andrew@ucbvax.Berkeley.EDU>
Sat, 23 Jan 1993 11:28:01 +0000 (03:28 -0800)
committerAndrew Cherenson <andrew@ucbvax.Berkeley.EDU>
Sat, 23 Jan 1993 11:28:01 +0000 (03:28 -0800)
SCCS-vsn: sys/netinet/tcp_input.c 7.32
SCCS-vsn: sys/netinet/tcp_output.c 7.26

usr/src/sys/netinet/tcp_input.c
usr/src/sys/netinet/tcp_output.c

index 7c2ae84..db65f24 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)tcp_input.c 7.31 (Berkeley) %G%
+ *     @(#)tcp_input.c 7.32 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -1372,15 +1372,6 @@ tcp_dooptions(tp, cp, cnt, ti, ts_present, ts_val, ts_ecr)
                                tp->ts_recent_age = tcp_now;
                        }
                        break;
                                tp->ts_recent_age = tcp_now;
                        }
                        break;
-#ifdef DO_SACK
-               case TCPOPT_SACK_PERMITTED:
-                       if (optlen != TCPOLEN_SACK_PERMITTED)
-                               continue;
-                       if (!(ti->ti_flags & TH_SYN))
-                               continue;
-                       tp->t_flags |= TF_SACK_PERMIT;
-                       break;
-#endif
                }
        }
 }
                }
        }
 }
index c946f2b..70c2084 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)tcp_output.c        7.25 (Berkeley) %G%
+ *     @(#)tcp_output.c        7.26 (Berkeley) %G%
  */
 
 #include <sys/param.h>
  */
 
 #include <sys/param.h>
@@ -243,16 +243,6 @@ send:
                                tp->request_r_scale);
                        optlen += 4;
                }
                                tp->request_r_scale);
                        optlen += 4;
                }
-#ifdef DO_SACK
-               /* Send a SACK_PERMITTED option in the SYN segment. */
-               *((u_long *) (opt + optlen)) = htonl(
-                               TCPOPT_NOP<<24 |
-                               TCPOPT_NOP<<16 |
-                               TCPOPT_SACK_PERMITTED<<8 |
-                               TCPOLEN_SACK_PERMITTED);
-               optlen += 4;
-#endif
        }
  
        /*
        }
  
        /*
@@ -272,61 +262,9 @@ send:
                *lp   = htonl(tp->ts_recent);
                optlen += TCPOLEN_TSTAMP_APPA;
        }
                *lp   = htonl(tp->ts_recent);
                optlen += TCPOLEN_TSTAMP_APPA;
        }
-#ifdef DO_SACK
-       /* Send SACK if needed. Don't tack a SACK onto a non-empty segment. */
-       if (tp->seg_next != (struct tcpiphdr *)tp && len == 0 &&
-           (tp->t_flags & (TF_SACK_PERMIT|TF_NOOPT)) == TF_SACK_PERMIT) {
-               register struct tcpiphdr *q = tp->seg_next;
-               register u_long *optl = (u_long *)(opt + optlen) + 1;
-               tcp_seq block_start;
-               u_long  block_size;
-               int sack_len = 2;
-               /*
-                * Use these to gather runs of received segments.
-                * The first segment in the queue becomes the initial run.
-                */
-               block_start = q->ti_seq;
-               block_size = q->ti_len;
-               do {
-                       q = (struct tcpiphdr *) q->ti_next;
-                       if (q == (struct tcpiphdr *) tp ||
-                               block_start + block_size != q->ti_seq) {
-                               
-                               /*
-                                * Stick the relative origin and block size
-                                * in the SACK option.
-                                */
-                               *optl++ = htonl(block_start-tp->rcv_nxt);
-                               *optl++ = htonl(block_size);
-                               sack_len += 8;
-                               /* If no more will fit into options, quit. */
-                               if (sack_len + optlen > MAX_TCPOPTLEN - 8)
-                                       break;
-                               if (q != (struct tcpiphdr *) tp) {
-                                       block_start = q->ti_seq;
-                                       block_size = q->ti_len;
-                               }
-                       } else {
-                               /* 
-                                * This segment just accumulates into previous
-                                * run.
-                                */
-                               block_size += q->ti_len;
-                       }
-               } while (q != (struct tcpiphdr *) tp);
-               *((u_long *) (opt + optlen)) = htonl(TCPOPT_NOP << 24 |
-                       TCPOPT_NOP << 16 | TCPOPT_SACK << 8 | sack_len);
-               optlen += sack_len + 2;
-       }
-#endif
+
        hdrlen += optlen;
        hdrlen += optlen;
        /*
         * Adjust data length if insertion of options will
         * bump the packet length beyond the t_maxseg length.
        /*
         * Adjust data length if insertion of options will
         * bump the packet length beyond the t_maxseg length.