Deleted Added
full compact
tcp_sack.c (130989) tcp_sack.c (133874)
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)tcp_sack.c 8.12 (Berkeley) 5/24/95
1/*
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)tcp_sack.c 8.12 (Berkeley) 5/24/95
30 * $FreeBSD: head/sys/netinet/tcp_sack.c 130989 2004-06-23 21:04:37Z ps $
30 * $FreeBSD: head/sys/netinet/tcp_sack.c 133874 2004-08-16 18:32:07Z rwatson $
31 */
32
33/*
34 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994
35 * The Regents of the University of California. All rights reserved.
36 *
37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions

--- 27 unchanged lines hidden (view full) ---

66 *
67 * 1. Redistributions of source code must retain the above copyright
68 * notice, this list of conditions and the following disclaimer.
69 * 2. Redistributions in binary form must reproduce the above copyright
70 * notice, this list of conditions and the following disclaimer in the
71 * documentation and/or other materials provided with the distribution.
72 * 3. All advertising materials mentioning features or use of this software
73 * must display the following acknowledgements:
31 */
32
33/*
34 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994
35 * The Regents of the University of California. All rights reserved.
36 *
37 * Redistribution and use in source and binary forms, with or without
38 * modification, are permitted provided that the following conditions

--- 27 unchanged lines hidden (view full) ---

66 *
67 * 1. Redistributions of source code must retain the above copyright
68 * notice, this list of conditions and the following disclaimer.
69 * 2. Redistributions in binary form must reproduce the above copyright
70 * notice, this list of conditions and the following disclaimer in the
71 * documentation and/or other materials provided with the distribution.
72 * 3. All advertising materials mentioning features or use of this software
73 * must display the following acknowledgements:
74 * This product includes software developed by the University of
75 * California, Berkeley and its contributors.
76 * This product includes software developed at the Information
77 * Technology Division, US Naval Research Laboratory.
74 * This product includes software developed by the University of
75 * California, Berkeley and its contributors.
76 * This product includes software developed at the Information
77 * Technology Division, US Naval Research Laboratory.
78 * 4. Neither the name of the NRL nor the names of its contributors
79 * may be used to endorse or promote products derived from this software
80 * without specific prior written permission.
81 *
82 * THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
83 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
84 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
85 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NRL OR

--- 403 unchanged lines hidden (view full) ---

489 u_long ocwnd = tp->snd_cwnd;
490
491 callout_stop(tp->tt_rexmt);
492 tp->t_rtttime = 0;
493 /*
494 * Set snd_cwnd to one segment beyond acknowledged offset
495 * (tp->snd_una has not yet been updated when this function is called.)
496 */
78 * 4. Neither the name of the NRL nor the names of its contributors
79 * may be used to endorse or promote products derived from this software
80 * without specific prior written permission.
81 *
82 * THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS
83 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
84 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
85 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NRL OR

--- 403 unchanged lines hidden (view full) ---

489 u_long ocwnd = tp->snd_cwnd;
490
491 callout_stop(tp->tt_rexmt);
492 tp->t_rtttime = 0;
493 /*
494 * Set snd_cwnd to one segment beyond acknowledged offset
495 * (tp->snd_una has not yet been updated when this function is called.)
496 */
497 /*
498 * Should really be
499 * min(tp->snd_cwnd, tp->t_maxseg + (th->th_ack - tp->snd_una))
497 /*
498 * Should really be
499 * min(tp->snd_cwnd, tp->t_maxseg + (th->th_ack - tp->snd_una))
500 */
501 tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
502 tp->t_flags |= TF_ACKNOW;
503 (void) tcp_output(tp);
504 tp->snd_cwnd = ocwnd;
505 /*
506 * Partial window deflation. Relies on fact that tp->snd_una
507 * not updated yet.

--- 85 unchanged lines hidden ---
500 */
501 tp->snd_cwnd = tp->t_maxseg + (th->th_ack - tp->snd_una);
502 tp->t_flags |= TF_ACKNOW;
503 (void) tcp_output(tp);
504 tp->snd_cwnd = ocwnd;
505 /*
506 * Partial window deflation. Relies on fact that tp->snd_una
507 * not updated yet.

--- 85 unchanged lines hidden ---