summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_subr.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2016-09-15 02:00:16 +0000
committerdlg <dlg@openbsd.org>2016-09-15 02:00:16 +0000
commit1378bae268607a02c6648b2f5af62a452cd7f812 (patch)
treedf8d0622b88e5eab156f9883c45fbd54dc90938b /sys/netinet/tcp_subr.c
parentbring back r1.53 (diff)
downloadwireguard-openbsd-1378bae268607a02c6648b2f5af62a452cd7f812.tar.xz
wireguard-openbsd-1378bae268607a02c6648b2f5af62a452cd7f812.zip
all pools have their ipl set via pool_setipl, so fold it into pool_init.
the ioff argument to pool_init() is unused and has been for many years, so this replaces it with an ipl argument. because the ipl will be set on init we no longer need pool_setipl. most of these changes have been done with coccinelle using the spatch below. cocci sucks at formatting code though, so i fixed that by hand. the manpage and subr_pool.c bits i did myself. ok tedu@ jmatthew@ @ipl@ expression pp; expression ipl; expression s, a, o, f, m, p; @@ -pool_init(pp, s, a, o, f, m, p); -pool_setipl(pp, ipl); +pool_init(pp, s, a, ipl, f, m, p);
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r--sys/netinet/tcp_subr.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 50936a0f8fa..bd0692d5f24 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.154 2016/09/06 00:04:15 dlg Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.155 2016/09/15 02:00:18 dlg Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -141,15 +141,14 @@ void
tcp_init(void)
{
tcp_iss = 1; /* wrong */
- pool_init(&tcpcb_pool, sizeof(struct tcpcb), 0, 0, 0, "tcpcb", NULL);
- pool_setipl(&tcpcb_pool, IPL_SOFTNET);
- pool_init(&tcpqe_pool, sizeof(struct tcpqent), 0, 0, 0, "tcpqe", NULL);
- pool_setipl(&tcpcb_pool, IPL_SOFTNET);
+ pool_init(&tcpcb_pool, sizeof(struct tcpcb), 0, IPL_SOFTNET, 0,
+ "tcpcb", NULL);
+ pool_init(&tcpqe_pool, sizeof(struct tcpqent), 0, IPL_SOFTNET, 0,
+ "tcpqe", NULL);
pool_sethardlimit(&tcpqe_pool, tcp_reass_limit, NULL, 0);
#ifdef TCP_SACK
- pool_init(&sackhl_pool, sizeof(struct sackhole), 0, 0, 0, "sackhl",
- NULL);
- pool_setipl(&sackhl_pool, IPL_SOFTNET);
+ pool_init(&sackhl_pool, sizeof(struct sackhole), 0, IPL_SOFTNET, 0,
+ "sackhl", NULL);
pool_sethardlimit(&sackhl_pool, tcp_sackhole_limit, NULL, 0);
#endif /* TCP_SACK */
in_pcbinit(&tcbtable, TCB_INITIAL_HASH_SIZE);