Deleted Added
full compact
tcp_syncache.c (193511) tcp_syncache.c (193731)
1/*-
2 * Copyright (c) 2001 McAfee, Inc.
3 * Copyright (c) 2006 Andre Oppermann, Internet Business Solutions AG
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Jonathan Lemon
7 * and McAfee Research, the Security Research Division of McAfee, Inc. under
8 * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

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

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 McAfee, Inc.
3 * Copyright (c) 2006 Andre Oppermann, Internet Business Solutions AG
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by Jonathan Lemon
7 * and McAfee Research, the Security Research Division of McAfee, Inc. under
8 * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the

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

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/netinet/tcp_syncache.c 193511 2009-06-05 14:55:22Z rwatson $");
34__FBSDID("$FreeBSD: head/sys/netinet/tcp_syncache.c 193731 2009-06-08 17:15:40Z zec $");
35
36#include "opt_inet.h"
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>

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

270 }
271
272 /* Create the syncache entry zone. */
273 V_tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache),
274 NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
275 uma_zone_set_max(V_tcp_syncache.zone, V_tcp_syncache.cache_limit);
276}
277
35
36#include "opt_inet.h"
37#include "opt_inet6.h"
38#include "opt_ipsec.h"
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/kernel.h>

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

270 }
271
272 /* Create the syncache entry zone. */
273 V_tcp_syncache.zone = uma_zcreate("syncache", sizeof(struct syncache),
274 NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
275 uma_zone_set_max(V_tcp_syncache.zone, V_tcp_syncache.cache_limit);
276}
277
278#ifdef VIMAGE
279void
280syncache_destroy(void)
281{
282 INIT_VNET_INET(curvnet);
283
284 /* XXX walk the cache, free remaining objects, stop timers */
285
286 uma_zdestroy(V_tcp_syncache.zone);
287 FREE(V_tcp_syncache.hashbase, M_SYNCACHE);
288}
289#endif
290
278/*
279 * Inserts a syncache entry into the specified bucket row.
280 * Locks and unlocks the syncache_head autonomously.
281 */
282static void
283syncache_insert(struct syncache *sc, struct syncache_head *sch)
284{
285 INIT_VNET_INET(sch->sch_vnet);

--- 1483 unchanged lines hidden ---
291/*
292 * Inserts a syncache entry into the specified bucket row.
293 * Locks and unlocks the syncache_head autonomously.
294 */
295static void
296syncache_insert(struct syncache *sc, struct syncache_head *sch)
297{
298 INIT_VNET_INET(sch->sch_vnet);

--- 1483 unchanged lines hidden ---