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

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

66 *
67 * The views and conclusions contained in the software and documentation
68 * are those of the authors and should not be interpreted as representing
69 * official policies, either expressed or implied, of the US Naval
70 * Research Laboratory (NRL).
71 */
72
73#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995
3 * The Regents of the University of California.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

66 *
67 * The views and conclusions contained in the software and documentation
68 * are those of the authors and should not be interpreted as representing
69 * official policies, either expressed or implied, of the US Naval
70 * Research Laboratory (NRL).
71 */
72
73#include <sys/cdefs.h>
74__FBSDID("$FreeBSD: head/sys/netinet/tcp_sack.c 196019 2009-08-01 19:26:27Z rwatson $");
74__FBSDID("$FreeBSD: head/sys/netinet/tcp_sack.c 207369 2010-04-29 11:52:42Z bz $");
75
76#include "opt_inet.h"
77#include "opt_inet6.h"
78#include "opt_tcpdebug.h"
79
80#include <sys/param.h>
81#include <sys/systm.h>
82#include <sys/kernel.h>

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

118#include <netinet/tcpip.h>
119#ifdef TCPDEBUG
120#include <netinet/tcp_debug.h>
121#endif /* TCPDEBUG */
122
123#include <machine/in_cksum.h>
124
125VNET_DECLARE(struct uma_zone *, sack_hole_zone);
75
76#include "opt_inet.h"
77#include "opt_inet6.h"
78#include "opt_tcpdebug.h"
79
80#include <sys/param.h>
81#include <sys/systm.h>
82#include <sys/kernel.h>

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

118#include <netinet/tcpip.h>
119#ifdef TCPDEBUG
120#include <netinet/tcp_debug.h>
121#endif /* TCPDEBUG */
122
123#include <machine/in_cksum.h>
124
125VNET_DECLARE(struct uma_zone *, sack_hole_zone);
126VNET_DEFINE(int, tcp_do_sack);
127VNET_DEFINE(int, tcp_sack_maxholes);
128VNET_DEFINE(int, tcp_sack_globalmaxholes);
129VNET_DEFINE(int, tcp_sack_globalholes);
130
131#define V_sack_hole_zone VNET(sack_hole_zone)
126#define V_sack_hole_zone VNET(sack_hole_zone)
132#define V_tcp_do_sack VNET(tcp_do_sack)
133#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes)
134#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes)
135#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes)
136
137SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK");
127
128SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK");
129VNET_DEFINE(int, tcp_do_sack) = 1;
130#define V_tcp_do_sack VNET(tcp_do_sack)
138SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW,
139 &VNET_NAME(tcp_do_sack), 0, "Enable/Disable TCP SACK support");
140
131SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW,
132 &VNET_NAME(tcp_do_sack), 0, "Enable/Disable TCP SACK support");
133
134VNET_DEFINE(int, tcp_sack_maxholes) = 128;
135#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes)
141SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_RW,
142 &VNET_NAME(tcp_sack_maxholes), 0,
143 "Maximum number of TCP SACK holes allowed per connection");
144
136SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, maxholes, CTLFLAG_RW,
137 &VNET_NAME(tcp_sack_maxholes), 0,
138 "Maximum number of TCP SACK holes allowed per connection");
139
140VNET_DEFINE(int, tcp_sack_globalmaxholes) = 65536;
141#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes)
145SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxholes, CTLFLAG_RW,
146 &VNET_NAME(tcp_sack_globalmaxholes), 0,
147 "Global maximum number of TCP SACK holes");
148
142SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalmaxholes, CTLFLAG_RW,
143 &VNET_NAME(tcp_sack_globalmaxholes), 0,
144 "Global maximum number of TCP SACK holes");
145
146VNET_DEFINE(int, tcp_sack_globalholes) = 0;
147#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes)
149SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalholes, CTLFLAG_RD,
150 &VNET_NAME(tcp_sack_globalholes), 0,
151 "Global number of TCP SACK holes currently allocated");
152
153/*
154 * This function is called upon receipt of new valid data (while not in
155 * header prediction mode), and it updates the ordered list of sacks.
156 */

--- 530 unchanged lines hidden ---
148SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, globalholes, CTLFLAG_RD,
149 &VNET_NAME(tcp_sack_globalholes), 0,
150 "Global number of TCP SACK holes currently allocated");
151
152/*
153 * This function is called upon receipt of new valid data (while not in
154 * header prediction mode), and it updates the ordered list of sacks.
155 */

--- 530 unchanged lines hidden ---