diff options
author | kmacy <kmacy@FreeBSD.org> | 2008-11-09 01:53:06 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2008-11-09 01:53:06 +0000 |
commit | 7f1b49e5c3dbad849d3a5aa144cd2142c9867824 (patch) | |
tree | 0194245781ad605319125f18aa643f25f2a389b4 /sys/kern | |
parent | 9fe9cedf42d903b585afbf27d6563b029d1b2873 (diff) | |
download | FreeBSD-src-7f1b49e5c3dbad849d3a5aa144cd2142c9867824.zip FreeBSD-src-7f1b49e5c3dbad849d3a5aa144cd2142c9867824.tar.gz |
make kern.ipc.nmbclusters actually have a useful effect on nmbclusters et al.
initialize pkthdr in field order
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_mbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 7846be8..8cc8def 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -104,13 +104,14 @@ struct mbstat mbstat; static void tunable_mbinit(void *dummy) { + TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); /* This has to be done before VM init. */ - nmbclusters = 1024 + maxusers * 64; + if (nmbclusters == 0) + nmbclusters = 1024 + maxusers * 64; nmbjumbop = nmbclusters / 2; nmbjumbo9 = nmbjumbop / 2; nmbjumbo16 = nmbjumbo9 / 2; - TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters); } SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL); @@ -409,8 +410,8 @@ mb_ctor_mbuf(void *mem, int size, void *arg, int how) if (flags & M_PKTHDR) { m->m_data = m->m_pktdat; m->m_pkthdr.rcvif = NULL; - m->m_pkthdr.len = 0; m->m_pkthdr.header = NULL; + m->m_pkthdr.len = 0; m->m_pkthdr.csum_flags = 0; m->m_pkthdr.csum_data = 0; m->m_pkthdr.tso_segsz = 0; |