Deleted Added
full compact
tcp_input.c (196019) tcp_input.c (196039)
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

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

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_input.c 8.12 (Berkeley) 5/24/95
30 */
31
32#include <sys/cdefs.h>
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

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

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_input.c 8.12 (Berkeley) 5/24/95
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 196019 2009-08-01 19:26:27Z rwatson $");
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 196039 2009-08-02 19:43:32Z rwatson $");
34
35#include "opt_ipfw.h" /* for ipfw_fwd */
36#include "opt_inet.h"
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39#include "opt_tcpdebug.h"
40
41#include <sys/param.h>

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

212 struct tcpcb *, int, int);
213static void tcp_pulloutofband(struct socket *,
214 struct tcphdr *, struct mbuf *, int);
215static void tcp_xmit_timer(struct tcpcb *, int);
216static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *);
217static void inline
218 tcp_congestion_exp(struct tcpcb *);
219
34
35#include "opt_ipfw.h" /* for ipfw_fwd */
36#include "opt_inet.h"
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39#include "opt_tcpdebug.h"
40
41#include <sys/param.h>

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

212 struct tcpcb *, int, int);
213static void tcp_pulloutofband(struct socket *,
214 struct tcphdr *, struct mbuf *, int);
215static void tcp_xmit_timer(struct tcpcb *, int);
216static void tcp_newreno_partial_ack(struct tcpcb *, struct tcphdr *);
217static void inline
218 tcp_congestion_exp(struct tcpcb *);
219
220/*
221 * Kernel module interface for updating tcpstat. The argument is an index
222 * into tcpstat treated as an array of u_long. While this encodes the
223 * general layout of tcpstat into the caller, it doesn't encode its location,
224 * so that future changes to add, for example, per-CPU stats support won't
225 * cause binary compatibility problems for kernel modules.
226 */
227void
228kmod_tcpstat_inc(int statnum)
229{
230
231 (*((u_long *)&V_tcpstat + statnum))++;
232}
233
220static void inline
221tcp_congestion_exp(struct tcpcb *tp)
222{
223 u_int win;
224
225 win = min(tp->snd_wnd, tp->snd_cwnd) /
226 2 / tp->t_maxseg;
227 if (win < 2)

--- 3226 unchanged lines hidden ---
234static void inline
235tcp_congestion_exp(struct tcpcb *tp)
236{
237 u_int win;
238
239 win = min(tp->snd_wnd, tp->snd_cwnd) /
240 2 / tp->t_maxseg;
241 if (win < 2)

--- 3226 unchanged lines hidden ---