summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2001-06-01 09:51:14 +0000
committerobrien <obrien@FreeBSD.org>2001-06-01 09:51:14 +0000
commit538a64fd6b278358acfa4573bfb607fb26100b35 (patch)
treede07c25560cbb107d4ebe3539548a69d389f7456 /sys
parente737f3aa3b5bba6b224879bce4faaae65ff25d55 (diff)
downloadFreeBSD-src-538a64fd6b278358acfa4573bfb607fb26100b35.zip
FreeBSD-src-538a64fd6b278358acfa4573bfb607fb26100b35.tar.gz
Back out jesper's 2001/05/31 14:58:11 PDT commit. It does not compile.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/uipc_mbuf.c5
-rw-r--r--sys/netinet/ip_input.c31
-rw-r--r--sys/netinet6/in6_proto.c2
-rw-r--r--sys/sys/param.h5
4 files changed, 6 insertions, 37 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c
index 61067a4..1cabff7 100644
--- a/sys/kern/uipc_mbuf.c
+++ b/sys/kern/uipc_mbuf.c
@@ -34,6 +34,7 @@
* $FreeBSD$
*/
+#include "opt_param.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/condvar.h>
@@ -98,6 +99,10 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, nmbufs, CTLFLAG_RD, &nmbufs, 0,
SYSCTL_INT(_kern_ipc, OID_AUTO, nmbcnt, CTLFLAG_RD, &nmbcnt, 0,
"Maximum number of ext_buf counters available");
+#ifndef NMBCLUSTERS
+#define NMBCLUSTERS (512 + MAXUSERS * 16)
+#endif
+
TUNABLE_INT_DECL("kern.ipc.nmbclusters", NMBCLUSTERS, nmbclusters);
TUNABLE_INT_DECL("kern.ipc.nmbufs", NMBCLUSTERS * 4, nmbufs);
TUNABLE_INT_DECL("kern.ipc.nmbcnt", EXT_COUNTERS, nmbcnt);
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 71ecf06..0963a0a 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -124,12 +124,6 @@ SYSCTL_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW,
&ip_keepfaith, 0,
"Enable packet capture for FAITH IPv4->IPv6 translater daemon");
-static int ip_nfragpackets = 0;
-static int ip_maxfragpackets = NMBCLUSTERS/4;
-SYSCTL_INT(_net_inet_ip, OID_AUTO, maxfragpackets, CTLFLAG_RW,
- &ip_maxfragpackets, 0,
- "Maximum number of IPv4 fragment reassembly queue entries");
-
/*
* XXX - Setting ip_checkinterface mostly implements the receive side of
* the Strong ES model described in RFC 1122, but since the routing table
@@ -868,15 +862,6 @@ ip_reass(m, head, fp)
* If first fragment to arrive, create a reassembly queue.
*/
if (fp == 0) {
- /*
- * Enforce upper bound on number of fragmented packets
- * for which we attempt reassembly;
- * If maxfrag is 0, never accept fragments.
- * If maxfrag is -1, accept all fragments without limitation.
- */
- if ((ip_maxfragpackets >= 0) && (ip_nfragpackets >= ip_maxfragpackets))
- goto dropfrag;
- ip_nfragpackets++;
if ((t = m_get(M_DONTWAIT, MT_FTABLE)) == NULL)
goto dropfrag;
fp = mtod(t, struct ipq *);
@@ -1025,7 +1010,6 @@ inserted:
TAILQ_REMOVE(head, fp, ipq_list);
nipq--;
(void) m_free(dtom(fp));
- ip_nfragpackets--;
m->m_len += (IP_VHL_HL(ip->ip_vhl) << 2);
m->m_data -= (IP_VHL_HL(ip->ip_vhl) << 2);
/* some debugging cruft by sklower, below, will go away soon */
@@ -1067,7 +1051,6 @@ ip_freef(fhp, fp)
}
TAILQ_REMOVE(fhp, fp, ipq_list);
(void) m_free(dtom(fp));
- ip_nfragpackets--;
nipq--;
}
@@ -1095,20 +1078,6 @@ ip_slowtimo()
}
}
}
- /*
- * If we are over the maximum number of fragments
- * (due to the limit being lowered), drain off
- * enough to get down to the new limit.
- */
- for (i = 0; i < IPREASS_NHASH; i++) {
- if (ip_maxfragpackets >= 0) {
- while (ip_nfragpackets > ip_maxfragpackets &&
- !TAILQ_EMPTY(&ipq[i])) {
- ipstat.ips_fragdropped++;
- ip_freef(&ipq[i], TAILQ_FIRST(&ipq[i]));
- }
- }
- }
ipflow_slowtimo();
splx(s);
}
diff --git a/sys/netinet6/in6_proto.c b/sys/netinet6/in6_proto.c
index 740a5a2..87db176 100644
--- a/sys/netinet6/in6_proto.c
+++ b/sys/netinet6/in6_proto.c
@@ -286,7 +286,7 @@ int ip6_sendredirects = IPV6_SENDREDIRECTS;
int ip6_defhlim = IPV6_DEFHLIM;
int ip6_defmcasthlim = IPV6_DEFAULT_MULTICAST_HOPS;
int ip6_accept_rtadv = 0; /* "IPV6FORWARDING ? 0 : 1" is dangerous */
-int ip6_maxfragpackets = NMBCLUSTERS/4;
+int ip6_maxfragpackets = 200;
int ip6_log_interval = 5;
int ip6_hdrnestlimit = 50; /* appropriate? */
int ip6_dad_count = 1; /* DupAddrDetectionTransmits */
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 16528fa..c0ab17c 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -232,9 +232,4 @@
#ifdef _KERNEL
void panic __P((const char *, ...)) __dead2 __printflike(1, 2);
#endif
-
-#include "opt_param.h"
-#ifndef NMBCLUSTERS
-#define NMBCLUSTERS (512 + MAXUSERS * 16)
-#endif
#endif /* _SYS_PARAM_H_ */
OpenPOWER on IntegriCloud