The NetBSD Project

CVS log for src/sys/kern/uipc_mbuf.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.232.4.3 / (download) - annotate - [select for diffs], Mon Nov 27 20:01:40 2023 UTC (4 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.232.4.2: +4 -10 lines
Diff to previous 1.232.4.2 (colored) to branchpoint 1.232 (colored) next main 1.233 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #1768):
	sys/kern/uipc_mbuf.c: revision 1.252

mbuf: avoid assertion failure when splitting mbuf cluster

From OpenBSD:
        commit 7b4d35e0a60ba1dd4daf4b1c2932020a22463a89
        Author: bluhm <bluhm@openbsd.org>
        Date:   Fri Oct 20 16:25:15 2023 +0000
            Avoid assertion failure when splitting mbuf cluster.
            m_split() calls m_align() to initialize the data pointer of newly
            allocated mbuf.  If the new mbuf will be converted to a cluster,
            this is not necessary.  If additionally the new mbuf is larger than
            MLEN, this can lead to a panic.
            Only call m_align() when a valid m_data is needed.  This is the
            case if we do not refecence the existing cluster, but memcpy() the
            data into the new mbuf.
            Reported-by: syzbot+0e6817f5877926f0e96a@syzkaller.appspotmail.com
            OK claudio@ deraadt@

The issue is harmless if DIAGNOSTIC is not enabled.

Revision 1.247.2.1 / (download) - annotate - [select for diffs], Mon Nov 27 20:00:17 2023 UTC (4 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2
Changes since 1.247: +4 -10 lines
Diff to previous 1.247 (colored) next main 1.248 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by ozaki-r in ticket #475):
	sys/kern/uipc_mbuf.c: revision 1.252

mbuf: avoid assertion failure when splitting mbuf cluster

From OpenBSD:
        commit 7b4d35e0a60ba1dd4daf4b1c2932020a22463a89
        Author: bluhm <bluhm@openbsd.org>
        Date:   Fri Oct 20 16:25:15 2023 +0000
            Avoid assertion failure when splitting mbuf cluster.
            m_split() calls m_align() to initialize the data pointer of newly
            allocated mbuf.  If the new mbuf will be converted to a cluster,
            this is not necessary.  If additionally the new mbuf is larger than
            MLEN, this can lead to a panic.
            Only call m_align() when a valid m_data is needed.  This is the
            case if we do not refecence the existing cluster, but memcpy() the
            data into the new mbuf.
            Reported-by: syzbot+0e6817f5877926f0e96a@syzkaller.appspotmail.com
            OK claudio@ deraadt@

The issue is harmless if DIAGNOSTIC is not enabled.

Revision 1.252 / (download) - annotate - [select for diffs], Mon Nov 27 02:50:27 2023 UTC (4 months, 2 weeks ago) by ozaki-r
Branch: MAIN
CVS Tags: HEAD
Changes since 1.251: +4 -10 lines
Diff to previous 1.251 (colored) to selected 1.198 (colored)

mbuf: avoid assertion failure when splitting mbuf cluster

From OpenBSD:

	commit 7b4d35e0a60ba1dd4daf4b1c2932020a22463a89
	Author: bluhm <bluhm@openbsd.org>
	Date:   Fri Oct 20 16:25:15 2023 +0000

	    Avoid assertion failure when splitting mbuf cluster.

	    m_split() calls m_align() to initialize the data pointer of newly
	    allocated mbuf.  If the new mbuf will be converted to a cluster,
	    this is not necessary.  If additionally the new mbuf is larger than
	    MLEN, this can lead to a panic.
	    Only call m_align() when a valid m_data is needed.  This is the
	    case if we do not refecence the existing cluster, but memcpy() the
	    data into the new mbuf.

	    Reported-by: syzbot+0e6817f5877926f0e96a@syzkaller.appspotmail.com
	    OK claudio@ deraadt@

The issue is harmless if DIAGNOSTIC is not enabled.

XXX pullup-10
XXX pullup-9

Revision 1.251 / (download) - annotate - [select for diffs], Wed Apr 12 06:48:08 2023 UTC (12 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.250: +46 -2 lines
Diff to previous 1.250 (colored) to selected 1.198 (colored)

mbuf(9): New m_get_n, m_gethdr_n.

m_get_n(how, type, alignbytes, nbytes) returns an mbuf with no packet
header having space for nbytes, with an internal buffer pointer
aligned by alignbytes (typically ETHER_ALIGN or similar, if not
zero).

m_gethdr_n(how, type, alignbytes, nbytes) does the same but for an
mbuf with a packet header.

These return NULL on failure, which can happen either:
(a) because how is M_DONTWAIT and allocating memory would sleep, or
(b) because alignbytes + nbytes > MCLBYTES.

On exit, m_len is set to nbytes, as is m_pkthdr.len for m_gethdr_n.

These should be used to systematically replace all calls to m_get,
m_gethdr, MGET, MGETHDR, and m_getcl.  Most calls to m_clget and
MCLGET will probably evaporate as a consequence.

Proposed on tech-net last year:
https://mail-index.netbsd.org/tech-net/2022/07/16/msg008285.html

Revision 1.250 / (download) - annotate - [select for diffs], Sat Apr 1 06:30:19 2023 UTC (12 months, 2 weeks ago) by skrll
Branch: MAIN
Changes since 1.249: +4 -4 lines
Diff to previous 1.249 (colored) to selected 1.198 (colored)

0x%p -> %p in KASSERTMSGs

Revision 1.249 / (download) - annotate - [select for diffs], Fri Mar 31 19:22:56 2023 UTC (12 months, 2 weeks ago) by riastradh
Branch: MAIN
Changes since 1.248: +30 -11 lines
Diff to previous 1.248 (colored) to selected 1.198 (colored)

mbuf(9): Sprinkle KASSERTMSG.

No functional change intended.

Revision 1.248 / (download) - annotate - [select for diffs], Fri Feb 24 11:02:27 2023 UTC (13 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.247: +2 -6 lines
Diff to previous 1.247 (colored) to selected 1.198 (colored)

kern: Eliminate most __HAVE_ATOMIC_AS_MEMBAR conditionals.

I'm leaving in the conditional around the legacy membar_enters
(store-before-load, store-before-store) in kern_mutex.c and in
kern_lock.c because they may still matter: store-before-load barriers
tend to be the most expensive kind, so eliding them is probably
worthwhile on x86.  (It also may not matter; I just don't care to do
measurements right now, and it's a single valid and potentially
justifiable use case in the whole tree.)

However, membar_release/acquire can be mere instruction barriers on
all TSO platforms including x86, so there's no need to go out of our
way with a bad API to conditionalize them.  If the procedure call
overhead is measurable we just could change them to be macros on x86
that expand into __insn_barrier.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html

Revision 1.247 / (download) - annotate - [select for diffs], Fri Dec 16 08:42:55 2022 UTC (16 months ago) by msaitoh
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RC1
Branch point for: netbsd-10
Changes since 1.246: +11 -2 lines
Diff to previous 1.246 (colored) to selected 1.198 (colored)

Add new "kern.mbuf.nmbclusters_limit" sysctl.

 - Used to know the upper limit of nmbclusters.
 - It's read only.

Revision 1.246 / (download) - annotate - [select for diffs], Sat Apr 9 23:38:33 2022 UTC (2 years ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.245: +4 -4 lines
Diff to previous 1.245 (colored) to selected 1.198 (colored)

sys: Use membar_release/acquire around reference drop.

This just goes through my recent reference count membar audit and
changes membar_exit to membar_release and membar_enter to
membar_acquire -- this should make everything cheaper on most CPUs
without hurting correctness, because membar_acquire is generally
cheaper than membar_enter.

Revision 1.245 / (download) - annotate - [select for diffs], Sat Mar 12 15:32:32 2022 UTC (2 years, 1 month ago) by riastradh
Branch: MAIN
Changes since 1.244: +8 -2 lines
Diff to previous 1.244 (colored) to selected 1.198 (colored)

sys: Membar audit around reference count releases.

If two threads are using an object that is freed when the reference
count goes to zero, we need to ensure that all memory operations
related to the object happen before freeing the object.

Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one
thread takes responsibility for freeing, but it's not enough to
ensure that the other thread's memory operations happen before the
freeing.

Consider:

	  Thread A			  Thread B
	obj->foo = 42;			obj->baz = 73;
	mumble(&obj->bar);		grumble(&obj->quux);
	/* membar_exit(); */		/* membar_exit(); */
	atomic_dec -- not last		atomic_dec -- last
					/* membar_enter(); */
					KASSERT(invariant(obj->foo,
					    obj->bar));
					free_stuff(obj);

The memory barriers ensure that

	obj->foo = 42;
	mumble(&obj->bar);

in thread A happens before

	KASSERT(invariant(obj->foo, obj->bar));
	free_stuff(obj);

in thread B.  Without them, this ordering is not guaranteed.

So in general it is necessary to do

	membar_exit();
	if (atomic_dec_uint_nv(&obj->refcnt) != 0)
		return;
	membar_enter();

to release a reference, for the `last one out hit the lights' style
of reference counting.  (This is in contrast to the style where one
thread blocks new references and then waits under a lock for existing
ones to drain with a condvar -- no membar needed thanks to mutex(9).)

I searched for atomic_dec to find all these.  Obviously we ought to
have a better abstraction for this because there's so much copypasta.
This is a stop-gap measure to fix actual bugs until we have that.  It
would be nice if an abstraction could gracefully handle the different
styles of reference counting in use -- some years ago I drafted an
API for this, but making it cover everything got a little out of hand
(particularly with struct vnode::v_usecount) and I ended up setting
it aside to work on psref/localcount instead for better scalability.

I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I
only put it on things that look performance-critical on 5sec review.
We should really adopt membar_enter_preatomic/membar_exit_postatomic
or something (except they are applicable only to atomic r/m/w, not to
atomic_load/store_*, making the naming annoying) and get rid of all
the ifdefs.

Revision 1.172.6.6 / (download) - annotate - [select for diffs], Mon Oct 25 15:49:49 2021 UTC (2 years, 5 months ago) by martin
Branch: netbsd-8
Changes since 1.172.6.5: +3 -7 lines
Diff to previous 1.172.6.5 (colored) to branchpoint 1.172 (colored) next main 1.173 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1703):

	sys/conf/files: revision 1.1288
	sys/kern/uipc_mbuf.c: revision 1.244
	share/man/man4/options.4: revision 1.520

Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.

Update the description of the NMBCLUSTERS. Add NMBCLUSTERS_MAX.

defparam NMBCLUSTERS_MAX.

Revision 1.232.4.2 / (download) - annotate - [select for diffs], Mon Oct 25 15:47:50 2021 UTC (2 years, 5 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-3-RELEASE
Changes since 1.232.4.1: +3 -7 lines
Diff to previous 1.232.4.1 (colored) to branchpoint 1.232 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by msaitoh in ticket #1368):

	sys/conf/files: revision 1.1288
	sys/kern/uipc_mbuf.c: revision 1.244
	share/man/man4/options.4: revision 1.520

Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.

Update the description of the NMBCLUSTERS. Add NMBCLUSTERS_MAX.

defparam NMBCLUSTERS_MAX.

Revision 1.244 / (download) - annotate - [select for diffs], Wed Oct 6 05:24:54 2021 UTC (2 years, 6 months ago) by msaitoh
Branch: MAIN
Changes since 1.243: +3 -7 lines
Diff to previous 1.243 (colored) to selected 1.198 (colored)

Fix a bug that NMBCLUSTERS(kern.mbuf.nmbclusters) can't be changed by sysctl.

Revision 1.241.2.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:00 2021 UTC (3 years ago) by thorpej
Branch: thorpej-futex
Changes since 1.241: +2 -2 lines
Diff to previous 1.241 (colored) next main 1.242 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.243 / (download) - annotate - [select for diffs], Thu Mar 4 01:37:42 2021 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.242: +0 -17 lines
Diff to previous 1.242 (colored) to selected 1.198 (colored)

 Revert accidentally committed debug code. Sorry.

Revision 1.242 / (download) - annotate - [select for diffs], Thu Mar 4 01:35:31 2021 UTC (3 years, 1 month ago) by msaitoh
Branch: MAIN
Changes since 1.241: +19 -2 lines
Diff to previous 1.241 (colored) to selected 1.198 (colored)

Add missing opt_inet.h.

Revision 1.232.4.1 / (download) - annotate - [select for diffs], Tue Aug 11 17:14:21 2020 UTC (3 years, 8 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-2-RELEASE, netbsd-9-1-RELEASE
Changes since 1.232: +4 -4 lines
Diff to previous 1.232 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by mrg in ticket #1045):

	sys/kern/uipc_mbuf.c: revision 1.235
	sys/dev/ic/dwc_gmac.c: revision 1.70
	sys/dev/ic/dwc_gmac_reg.h: revision 1.20
	sys/dev/ic/dwc_gmac.c: revision 1.66
	sys/dev/ic/dwc_gmac.c: revision 1.67
	sys/dev/ic/dwc_gmac.c: revision 1.68

awge: fix issue that caused rx packets to be corrupt with DIAGNOSTIC kernel

It seems the hardware can only reliably do rx DMA to addresses that are
dcache size aligned. This is hinted at by some GMAC data sheets but hard to
find an authoritative source.

on non-DIAGNOSTIC kernels we always implicitly get MCLBYTES-aligned mbuf
data pointers, but with the reintroduction of POOL_REDZONE for DIAGNOSTIC
we can get 8-byte alignment due to redzone padding. So align rx pointers to
64 bytes which should be good for both arm32 and aarch64.
While here change some bus_dmamap_load() to bus_dmamap_load_mbuf() and add
one missing bus_dmamap_sync(). Also fixes the code to not assume that
MCLBYTES == AWGE_MAX_PACKET. User may override MCLSHIFT in kernel config.
correct pointer arithmetics

mcl_cache: align items to COHERENCY_UNIT

Because we do cache incoherent DMA to/from mbufs we cannot safely share
share cache lines with adjacent items that may be concurrently accessed.

awge: drop redundant m_adj(). Handled via uipc_mbuf.c r1.235 instead.

Mask all the MMC counter interrupts if the MMC module is present.

Revision 1.241 / (download) - annotate - [select for diffs], Tue May 5 20:36:48 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.240: +15 -4 lines
Diff to previous 1.240 (colored) to selected 1.198 (colored)

fix KASSERT() for MHLEN case in m_defrag() - network stack usually does
m_adj(ETHER_ALIGN) so check that the mbuf chain data fits
M_LEADINGSPACE() + M_TRAILINGSPACE()

Revision 1.237.2.1 / (download) - annotate - [select for diffs], Sat Apr 25 11:24:06 2020 UTC (3 years, 11 months ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.237: +40 -2 lines
Diff to previous 1.237 (colored) next main 1.238 (colored) to selected 1.198 (colored)

Sync with bouyer-xenpvh-base2 (HEAD)

Revision 1.240 / (download) - annotate - [select for diffs], Sat Apr 25 11:03:04 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.239: +21 -21 lines
Diff to previous 1.239 (colored) to selected 1.198 (colored)

in m_defrag() must copy data elsewhere before adding cluster, the
data part of mbuf gets reused and hence overwritten by extbuf

Revision 1.239 / (download) - annotate - [select for diffs], Fri Apr 24 22:50:55 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
CVS Tags: bouyer-xenpvh-base2
Changes since 1.238: +6 -2 lines
Diff to previous 1.238 (colored) to selected 1.198 (colored)

add KASSERT() that the while data buffer in a mbuf or the mbuf
cluster fits within the same page

pools actually never return items whose memory cross page boundary for item
sizes smaller than PAGE_SIZE

Revision 1.238 / (download) - annotate - [select for diffs], Fri Apr 24 22:07:12 2020 UTC (3 years, 11 months ago) by jdolecek
Branch: MAIN
Changes since 1.237: +36 -2 lines
Diff to previous 1.237 (colored) to selected 1.198 (colored)

change m_defrag() to coalesce the chain to single mbuf if it's short enough
and first mbuf doesn't use external storage

most fragmented packets end up with first short mbuf containing
frame + protocol header only, and second mbuf containing the data;
m_defrag() previously always returned chain of at least two mbufs,
now it should actually return all data in single mbuf for typical
mbuf chain with length < MCLBYTES

Revision 1.215.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:05:04 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.215.2.1: +19 -24 lines
Diff to previous 1.215.2.1 (colored) to branchpoint 1.215 (colored) next main 1.216 (colored) to selected 1.198 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.237 / (download) - annotate - [select for diffs], Sun Mar 15 23:14:41 2020 UTC (4 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base1, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.236: +10 -2 lines
Diff to previous 1.236 (colored) to selected 1.198 (colored)

Add and use a new function, mowner_init_owner(), that initializes an
MBUFTRACE mowner structure (so that providers of it don't have to
grovel the internals).

Revision 1.236 / (download) - annotate - [select for diffs], Fri Dec 6 07:27:07 2019 UTC (4 years, 4 months ago) by maxv
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Changes since 1.235: +3 -3 lines
Diff to previous 1.235 (colored) to selected 1.198 (colored)

Minor changes, reported by the LGTM bot.

Revision 1.235 / (download) - annotate - [select for diffs], Sat Oct 19 06:36:47 2019 UTC (4 years, 5 months ago) by tnn
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.234: +4 -4 lines
Diff to previous 1.234 (colored) to selected 1.198 (colored)

mcl_cache: align items to COHERENCY_UNIT

Because we do cache incoherent DMA to/from mbufs we cannot safely share
share cache lines with adjacent items that may be concurrently accessed.

Revision 1.234 / (download) - annotate - [select for diffs], Sat Sep 28 16:02:12 2019 UTC (4 years, 6 months ago) by jmcneill
Branch: MAIN
Changes since 1.233: +4 -4 lines
Diff to previous 1.233 (colored) to selected 1.198 (colored)

mbstat_conver_to_user_cb -> mbstat_convert_to_user_cb

Revision 1.233 / (download) - annotate - [select for diffs], Wed Sep 18 16:18:12 2019 UTC (4 years, 6 months ago) by maxv
Branch: MAIN
Changes since 1.232: +6 -19 lines
Diff to previous 1.232 (colored) to selected 1.198 (colored)

Handle M_EXT with M_BUFADDR, and introduce M_BUFSIZE. Use them to dedup
code.

Revision 1.215.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:04 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.215: +490 -131 lines
Diff to previous 1.215 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.181.2.12 / (download) - annotate - [select for diffs], Fri Jan 18 08:50:57 2019 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.181.2.11: +7 -4 lines
Diff to previous 1.181.2.11 (colored) to branchpoint 1.181 (colored) next main 1.182 (colored) to selected 1.198 (colored)

Synch with HEAD

Revision 1.232 / (download) - annotate - [select for diffs], Thu Jan 17 02:47:15 2019 UTC (5 years, 3 months ago) by knakahara
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, netbsd-9-base, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2
Branch point for: netbsd-9
Changes since 1.231: +3 -2 lines
Diff to previous 1.231 (colored) to selected 1.198 (colored)

Fix ipsecif(4) cannot apply input direction packet filter. Reviewed by ozaki-r@n.o and ryo@n.o.

Add ATF later.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Jan 16 01:50:25 2019 UTC (5 years, 3 months ago) by knakahara
Branch: MAIN
Changes since 1.230: +4 -2 lines
Diff to previous 1.230 (colored) to selected 1.198 (colored)

Initialize m_pkthdr members explicity.

Revision 1.230 / (download) - annotate - [select for diffs], Thu Dec 27 14:03:55 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.229: +4 -4 lines
Diff to previous 1.229 (colored) to selected 1.198 (colored)

Remove M_COPY_PKTHDR, M_MOVE_PKTHDR, M_ALIGN and MH_ALIGN.

Revision 1.181.2.11 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:04 2018 UTC (5 years, 3 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.10: +37 -13 lines
Diff to previous 1.181.2.10 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.229 / (download) - annotate - [select for diffs], Sat Dec 22 14:28:56 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1226
Changes since 1.228: +5 -5 lines
Diff to previous 1.228 (colored) to selected 1.198 (colored)

Replace M_ALIGN and MH_ALIGN by m_align.

Revision 1.228 / (download) - annotate - [select for diffs], Sat Dec 22 14:07:53 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.227: +4 -4 lines
Diff to previous 1.227 (colored) to selected 1.198 (colored)

Replace: M_COPY_PKTHDR -> m_copy_pkthdr. No functional change, since the
former is a macro to the latter.

Revision 1.227 / (download) - annotate - [select for diffs], Sat Dec 22 13:55:56 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.226: +28 -4 lines
Diff to previous 1.226 (colored) to selected 1.198 (colored)

Move m_align() back into the kernel, and switch M_ALIGN and MH_ALIGN to it.
Forcing a distinction between M_ALIGN and MH_ALIGN is too bug-friendly and
serves no particular purpose.

Revision 1.226 / (download) - annotate - [select for diffs], Sat Dec 22 13:11:37 2018 UTC (5 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.225: +6 -6 lines
Diff to previous 1.225 (colored) to selected 1.198 (colored)

Replace: M_MOVE_PKTHDR -> m_move_pkthdr. No functional change, since the
former is a macro to the latter.

Revision 1.181.2.10 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:50 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.9: +395 -101 lines
Diff to previous 1.181.2.9 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.225 / (download) - annotate - [select for diffs], Thu Nov 15 10:56:30 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-1126
Changes since 1.224: +5 -9 lines
Diff to previous 1.224 (colored) to selected 1.198 (colored)

Remove the 'copy' argument from m_devget(), unused. While here rename
off0->off.

Revision 1.224 / (download) - annotate - [select for diffs], Thu Nov 15 10:37:26 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.223: +10 -2 lines
Diff to previous 1.223 (colored) to selected 1.198 (colored)

Add KASSERTs.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Nov 15 10:23:55 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.222: +4 -7 lines
Diff to previous 1.222 (colored) to selected 1.198 (colored)

Remove the 't' argument from m_tag_find().

Revision 1.222 / (download) - annotate - [select for diffs], Thu Nov 15 10:06:07 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.221: +12 -39 lines
Diff to previous 1.221 (colored) to selected 1.198 (colored)

Simplify the mtag API:

 - Remove m_tag_init(), m_tag_first(), m_tag_next() and
   m_tag_delete_nonpersistent().

 - Remove the 't' argument from m_tag_delete_chain().

Revision 1.221 / (download) - annotate - [select for diffs], Thu Nov 15 09:38:57 2018 UTC (5 years, 5 months ago) by maxv
Branch: MAIN
Changes since 1.220: +410 -90 lines
Diff to previous 1.220 (colored) to selected 1.198 (colored)

Merge uipc_mbuf2.c into uipc_mbuf.c. Reorder the latter a little to gather
similar functions. No functional change.

Revision 1.181.2.9 / (download) - annotate - [select for diffs], Sat Oct 20 06:58:45 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.8: +4 -4 lines
Diff to previous 1.181.2.8 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with head

Revision 1.220 / (download) - annotate - [select for diffs], Fri Oct 5 05:06:48 2018 UTC (5 years, 6 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-1020
Changes since 1.219: +4 -4 lines
Diff to previous 1.219 (colored) to selected 1.198 (colored)

 s/conver_to/convert_to/. No functional change.

Revision 1.181.2.8 / (download) - annotate - [select for diffs], Thu Sep 6 06:56:42 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.7: +16 -16 lines
Diff to previous 1.181.2.7 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.219 / (download) - annotate - [select for diffs], Mon Sep 3 16:29:35 2018 UTC (5 years, 7 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.218: +15 -15 lines
Diff to previous 1.218 (colored) to selected 1.198 (colored)

Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.218 / (download) - annotate - [select for diffs], Thu Aug 9 17:43:55 2018 UTC (5 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.217: +3 -3 lines
Diff to previous 1.217 (colored) to selected 1.198 (colored)

Localify mcl_cache.

Revision 1.181.2.7 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:08 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.6: +41 -3 lines
Diff to previous 1.181.2.6 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.217 / (download) - annotate - [select for diffs], Wed Jul 18 07:06:40 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
CVS Tags: pgoyette-compat-0728
Changes since 1.216: +13 -5 lines
Diff to previous 1.216 (colored) to selected 1.198 (colored)

- Fix compile error for kernel configuration file which has no any Ethernet
  device driver.
- Add missing default label.
- Fix NetBSD RCS Id.

Revision 1.216 / (download) - annotate - [select for diffs], Tue Jul 17 05:52:07 2018 UTC (5 years, 9 months ago) by msaitoh
Branch: MAIN
Changes since 1.215: +33 -3 lines
Diff to previous 1.215 (colored) to selected 1.198 (colored)

 Add /d(dump) and /v(verbose) modifiers to DDB's "show mbuf" command. Mainly
written by Hiroki SUENAGA. Currently, /v supports Ethernet, PPP, PPPoE, ARP,
IPv4, ICMP, IPv6, ICMPv6, TCP and UDP.

Revision 1.172.6.5 / (download) - annotate - [select for diffs], Tue May 22 17:50:27 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Changes since 1.172.6.4: +2 -7 lines
Diff to previous 1.172.6.4 (colored) to branchpoint 1.172 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #833):

	sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

Revision 1.158.4.1.2.4 / (download) - annotate - [select for diffs], Tue May 22 17:38:05 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-7-0
Changes since 1.158.4.1.2.3: +2 -7 lines
Diff to previous 1.158.4.1.2.3 (colored) to branchpoint 1.158.4.1 (colored) next main 1.158.4.2 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1606):

	sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

Revision 1.158.4.1.6.4 / (download) - annotate - [select for diffs], Tue May 22 17:36:45 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-7-1
Changes since 1.158.4.1.6.3: +2 -7 lines
Diff to previous 1.158.4.1.6.3 (colored) to branchpoint 1.158.4.1 (colored) next main 1.158.4.2 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1606):

	sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

Revision 1.158.4.5 / (download) - annotate - [select for diffs], Tue May 22 17:35:38 2018 UTC (5 years, 10 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-2-RELEASE
Changes since 1.158.4.4: +2 -7 lines
Diff to previous 1.158.4.4 (colored) to branchpoint 1.158 (colored) next main 1.159 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1606):

	sys/kern/uipc_mbuf.c: revision 1.214

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

Revision 1.181.2.6 / (download) - annotate - [select for diffs], Mon May 21 04:36:15 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.5: +7 -10 lines
Diff to previous 1.181.2.5 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.158.4.1.2.3 / (download) - annotate - [select for diffs], Tue May 15 04:48:16 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-7-0
Changes since 1.158.4.1.2.2: +19 -13 lines
Diff to previous 1.158.4.1.2.2 (colored) to branchpoint 1.158.4.1 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1602):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.215 / (download) - annotate - [select for diffs], Mon May 7 09:57:37 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.214: +6 -4 lines
Diff to previous 1.214 (colored) to selected 1.198 (colored)

Copy some KASSERTs from m_move_pkthdr into m_copy_pkthdr, and reorder the
latter to reduce the diff with the former.

Revision 1.172.6.4 / (download) - annotate - [select for diffs], Sun May 6 09:20:43 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-8
Changes since 1.172.6.3: +19 -13 lines
Diff to previous 1.172.6.3 (colored) to branchpoint 1.172 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #802):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).
Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.158.4.1.6.3 / (download) - annotate - [select for diffs], Thu May 3 15:14:48 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-7-1
Changes since 1.158.4.1.6.2: +19 -13 lines
Diff to previous 1.158.4.1.6.2 (colored) to branchpoint 1.158.4.1 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1602):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.158.4.4 / (download) - annotate - [select for diffs], Thu May 3 15:13:36 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-7
Changes since 1.158.4.3: +19 -13 lines
Diff to previous 1.158.4.3 (colored) to branchpoint 1.158 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1602):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.145.6.1 / (download) - annotate - [select for diffs], Thu May 3 15:02:30 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-6-0
Changes since 1.145: +19 -13 lines
Diff to previous 1.145 (colored) next main 1.146 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1547):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.145.2.1.2.1 / (download) - annotate - [select for diffs], Thu May 3 15:01:20 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-6-1
Changes since 1.145.2.1: +19 -13 lines
Diff to previous 1.145.2.1 (colored) next main 1.145.2.2 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1547):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.145.2.2 / (download) - annotate - [select for diffs], Thu May 3 15:00:37 2018 UTC (5 years, 11 months ago) by martin
Branch: netbsd-6
Changes since 1.145.2.1: +19 -13 lines
Diff to previous 1.145.2.1 (colored) to branchpoint 1.145 (colored) next main 1.146 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1547):

	sys/kern/uipc_mbuf.c: revision 1.211 (via patch)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.214 / (download) - annotate - [select for diffs], Thu May 3 07:46:17 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.213: +2 -7 lines
Diff to previous 1.213 (colored) to selected 1.198 (colored)

Revert my rev1.190, remove the M_READONLY check. The initial code was
correct: what is read-only is the mbuf storage, not the mbuf itself. The
storage contains the packet payload, and never has anything related to
mbufs. So it is fine to remove M_PKTHDR on mbufs that have a read-only
storage.

In fact it was kind of obvious, since several places already manually
remove M_PKTHDR without taking care of the external storage.

Revision 1.213 / (download) - annotate - [select for diffs], Thu May 3 07:25:50 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.212: +3 -3 lines
Diff to previous 1.212 (colored) to selected 1.198 (colored)

Rename m_pkthdr_remove -> m_remove_pkthdr, to match the existing naming
convention, eg m_copy_pkthdr and m_move_pkthdr.

Revision 1.181.2.5 / (download) - annotate - [select for diffs], Wed May 2 07:20:22 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.4: +254 -325 lines
Diff to previous 1.181.2.4 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Synch with HEAD

Revision 1.212 / (download) - annotate - [select for diffs], Sat Apr 28 08:34:45 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0502
Changes since 1.211: +20 -20 lines
Diff to previous 1.211 (colored) to selected 1.198 (colored)

Rename the 'flags' and 'nowait' arguments to 'how'. The other BSDs did the
same. Also, in m_defrag, rename 'mold' to 'm'.

Revision 1.211 / (download) - annotate - [select for diffs], Sat Apr 28 08:16:15 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.210: +19 -13 lines
Diff to previous 1.210 (colored) to selected 1.198 (colored)

Modify m_defrag, so that it never frees the first mbuf of the chain. While
here use the given 'flags' argument, and not M_DONTWAIT.

We have a problem with several drivers: they poll an mbuf chain from their
queues and call m_defrag on them, but m_defrag could update the mbuf
pointer, so the mbuf in the queue is no longer valid. It is not easy to
fix each driver, because doing pop+push will reorder the queue, and we
don't really want that to happen.

This problem was independently spotted by me, Kengo, Masanobu, and other
people too it seems (perhaps PR/53218).

Now m_defrag leaves the first mbuf in place, and compresses the chain
only starting from the second mbuf in the chain.

It is important not to compress the first mbuf with hacks, because the
storage of this first mbuf may be shared with other mbufs.

Revision 1.210 / (download) - annotate - [select for diffs], Fri Apr 27 19:06:48 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.209: +2 -3 lines
Diff to previous 1.209 (colored) to selected 1.198 (colored)

Remove unused debug code.

Revision 1.209 / (download) - annotate - [select for diffs], Fri Apr 27 18:40:40 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.208: +3 -3 lines
Diff to previous 1.208 (colored) to selected 1.198 (colored)

Remove reference to m_ext.ext_type (doesn't exist).

Revision 1.208 / (download) - annotate - [select for diffs], Fri Apr 27 16:32:03 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.207: +2 -3 lines
Diff to previous 1.207 (colored) to selected 1.198 (colored)

Remove unused ext_flags field in struct _m_ext_storage.

Also, simplify MEXTMALLOC, mbtypes[] doesn't exist anymore, but the code
still compiled correctly because "malloc" is a macro and the argument
was dropped.

Revision 1.207 / (download) - annotate - [select for diffs], Fri Apr 27 16:18:40 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.206: +4 -5 lines
Diff to previous 1.206 (colored) to selected 1.198 (colored)

Stop passing the pool as argument of the storage. M_EXT_CLUSTER mbufs
are supposed to take their area from mcl_cache only.

Revision 1.206 / (download) - annotate - [select for diffs], Fri Apr 27 09:22:28 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.205: +19 -3 lines
Diff to previous 1.205 (colored) to selected 1.198 (colored)

Remove _MCLGET, merge its content into m_clget(). The code is slightly
modified to reduce the indentation level.

Revision 1.205 / (download) - annotate - [select for diffs], Fri Apr 27 08:23:18 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.204: +91 -96 lines
Diff to previous 1.204 (colored) to selected 1.198 (colored)

Reorder, to group related functions.

Revision 1.204 / (download) - annotate - [select for diffs], Fri Apr 27 07:53:07 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.203: +5 -5 lines
Diff to previous 1.203 (colored) to selected 1.198 (colored)

M_CLUSTER -> M_EXT_CLUSTER

Revision 1.203 / (download) - annotate - [select for diffs], Fri Apr 27 07:41:58 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.202: +41 -40 lines
Diff to previous 1.202 (colored) to selected 1.198 (colored)

Rename m_reclaim -> mb_drain, and localify.

Revision 1.202 / (download) - annotate - [select for diffs], Fri Apr 27 07:20:33 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.201: +14 -2 lines
Diff to previous 1.201 (colored) to selected 1.198 (colored)

Implement M_COPY_PKTHDR as a function, like m_move_pkthdr.

Revision 1.201 / (download) - annotate - [select for diffs], Fri Apr 27 06:56:21 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.200: +2 -71 lines
Diff to previous 1.200 (colored) to selected 1.198 (colored)

Move m_align and m_append into iee80211_netbsd.c. They are part of
net80211, and shouldn't be used outside.

Revision 1.200 / (download) - annotate - [select for diffs], Fri Apr 27 06:36:16 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.199: +7 -8 lines
Diff to previous 1.199 (colored) to selected 1.198 (colored)

Simplify m_copydata, use unsigned int, and change its last argument to
match that of the man page.

Revision 1.199 / (download) - annotate - [select for diffs], Fri Apr 27 06:27:36 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.198: +27 -44 lines
Diff to previous 1.198 (colored)

Style and simplify.

Revision 1.198 / (download) - annotate - [selected], Fri Apr 27 06:15:49 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.197: +6 -2 lines
Diff to previous 1.197 (colored)

Panic in m_copypacket if no header is present, that's a requirement.

Revision 1.197 / (download) - annotate - [select for diffs], Thu Apr 26 19:13:34 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.196: +3 -3 lines
Diff to previous 1.196 (colored) to selected 1.198 (colored)

Change MCLGET, so that it calls m_clget instead of doing the work in a
macro. Macros are inefficient when they contain too many instructions and
are used too often, because of cache coherency (and also register use).

This change saves 32KB of kernel .text.

Revision 1.196 / (download) - annotate - [select for diffs], Thu Apr 26 08:31:36 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.195: +37 -44 lines
Diff to previous 1.195 (colored) to selected 1.198 (colored)

Rename

	m_copyback0 -> m_copyback_internal
	M_COPYBACK0_* -> CB_*

That's a lot less misleading. While here, fix a bunch of panic messages.

Revision 1.195 / (download) - annotate - [select for diffs], Thu Apr 26 08:13:30 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.194: +15 -21 lines
Diff to previous 1.194 (colored) to selected 1.198 (colored)

Stop adding '0's in parameter and function names, that's just misleading.
Some remain, they need more investigation.

Revision 1.194 / (download) - annotate - [select for diffs], Thu Apr 26 07:46:24 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.193: +3 -5 lines
Diff to previous 1.193 (colored) to selected 1.198 (colored)

Change comment, to clearly say that m_prepend should not be used directly.

Revision 1.181.2.4 / (download) - annotate - [select for diffs], Sun Apr 22 07:20:27 2018 UTC (5 years, 11 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.3: +15 -4 lines
Diff to previous 1.181.2.3 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.193 / (download) - annotate - [select for diffs], Fri Apr 20 06:01:59 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0422
Changes since 1.192: +3 -3 lines
Diff to previous 1.192 (colored) to selected 1.198 (colored)

Cast to int, to properly handle dstoff > MHLEN (which never happens).

Revision 1.192 / (download) - annotate - [select for diffs], Thu Apr 19 05:16:02 2018 UTC (5 years, 11 months ago) by maxv
Branch: MAIN
Changes since 1.191: +3 -3 lines
Diff to previous 1.191 (colored) to selected 1.198 (colored)

The mbuf length is allowed to be zero.

Revision 1.158.4.1.2.2 / (download) - annotate - [select for diffs], Tue Apr 17 08:30:08 2018 UTC (6 years ago) by martin
Branch: netbsd-7-0
Changes since 1.158.4.1.2.1: +7 -2 lines
Diff to previous 1.158.4.1.2.1 (colored) to branchpoint 1.158.4.1 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1598):

	sys/kern/uipc_mbuf.c: revision 1.190

If the mbuf is shared leave M_PKTHDR in place. Given where this function
is called from that's not supposed to happen, but I'm growing unconfident
about our mbuf code.

Revision 1.158.4.1.6.2 / (download) - annotate - [select for diffs], Tue Apr 17 08:28:55 2018 UTC (6 years ago) by martin
Branch: netbsd-7-1
Changes since 1.158.4.1.6.1: +7 -2 lines
Diff to previous 1.158.4.1.6.1 (colored) to branchpoint 1.158.4.1 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1598):

	sys/kern/uipc_mbuf.c: revision 1.190

If the mbuf is shared leave M_PKTHDR in place. Given where this function
is called from that's not supposed to happen, but I'm growing unconfident
about our mbuf code.

Revision 1.158.4.3 / (download) - annotate - [select for diffs], Tue Apr 17 08:27:18 2018 UTC (6 years ago) by martin
Branch: netbsd-7
Changes since 1.158.4.2: +7 -2 lines
Diff to previous 1.158.4.2 (colored) to branchpoint 1.158 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1598):

	sys/kern/uipc_mbuf.c: revision 1.190

If the mbuf is shared leave M_PKTHDR in place. Given where this function
is called from that's not supposed to happen, but I'm growing unconfident
about our mbuf code.

Revision 1.172.6.3 / (download) - annotate - [select for diffs], Tue Apr 17 08:24:01 2018 UTC (6 years ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-0-RC1
Changes since 1.172.6.2: +7 -2 lines
Diff to previous 1.172.6.2 (colored) to branchpoint 1.172 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #770):

	sys/kern/uipc_mbuf.c: revision 1.190

If the mbuf is shared leave M_PKTHDR in place. Given where this function
is called from that's not supposed to happen, but I'm growing unconfident
about our mbuf code.

Revision 1.191 / (download) - annotate - [select for diffs], Tue Apr 17 07:58:31 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.190: +7 -3 lines
Diff to previous 1.190 (colored) to selected 1.198 (colored)

change the comment

Revision 1.190 / (download) - annotate - [select for diffs], Tue Apr 17 07:41:34 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.189: +7 -2 lines
Diff to previous 1.189 (colored) to selected 1.198 (colored)

If the mbuf is shared leave M_PKTHDR in place. Given where this function
is called from that's not supposed to happen, but I'm growing unconfident
about our mbuf code.

Revision 1.189 / (download) - annotate - [select for diffs], Mon Apr 16 19:19:51 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.188: +4 -2 lines
Diff to previous 1.188 (colored) to selected 1.198 (colored)

Disable the M_PKTHDR check for now. It causes PR/53189 (which is also
reproducible on i386).

It seems that someone is giving looutput a malformed chain.

Revision 1.181.2.3 / (download) - annotate - [select for diffs], Mon Apr 16 02:00:08 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.2: +132 -84 lines
Diff to previous 1.181.2.2 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Sync with HEAD, resolve some conflicts

Revision 1.188 / (download) - annotate - [select for diffs], Sun Apr 15 07:35:49 2018 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0415
Changes since 1.187: +63 -2 lines
Diff to previous 1.187 (colored) to selected 1.198 (colored)

Introduce a m_verify_packet function, that verifies the mbuf chain of a
packet to ensure it is not malformed. Call this function in "points of
interest", that are the IPv4/IPv6/IPsec entry points. There could be more.

We use M_VERIFY_PACKET(m), declared under DIAGNOSTIC only.

This function should not be called everywhere, especially not in places
that temporarily manipulate (and clobber) the mbuf structure; once they're
done they put the mbuf back in a correct format.

Revision 1.187 / (download) - annotate - [select for diffs], Tue Apr 10 16:12:30 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.186: +2 -14 lines
Diff to previous 1.186 (colored) to selected 1.198 (colored)

Remove m_getclr. It is unused, confusing (vs m_clget), and is a weak
implementation (eg you can't request a zeroed pkthdr mbuf).

Revision 1.186 / (download) - annotate - [select for diffs], Tue Apr 10 15:29:46 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.185: +71 -71 lines
Diff to previous 1.185 (colored) to selected 1.198 (colored)

Put the "free" functions close to one another. No functional change.

Revision 1.185 / (download) - annotate - [select for diffs], Tue Apr 10 15:27:35 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.184: +4 -5 lines
Diff to previous 1.184 (colored) to selected 1.198 (colored)

Localify m_ext_free.

Revision 1.172.6.2 / (download) - annotate - [select for diffs], Thu Apr 5 14:33:41 2018 UTC (6 years ago) by martin
Branch: netbsd-8
Changes since 1.172.6.1: +12 -2 lines
Diff to previous 1.172.6.1 (colored) to branchpoint 1.172 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #695):

	sys/kern/uipc_mbuf.c: revision 1.182
	sys/netinet6/frag6.c: revision 1.67
	sys/netinet/ip_reass.c: revision 1.14
	sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

Revision 1.158.4.1.2.1 / (download) - annotate - [select for diffs], Thu Apr 5 11:53:02 2018 UTC (6 years ago) by martin
Branch: netbsd-7-0
Changes since 1.158.4.1: +12 -2 lines
Diff to previous 1.158.4.1 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1594):

	sys/kern/uipc_mbuf.c: revision 1.182
	sys/netinet6/frag6.c: revision 1.67
	sys/netinet/ip_reass.c: revision 1.14
	sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

Revision 1.158.4.1.6.1 / (download) - annotate - [select for diffs], Thu Apr 5 11:50:17 2018 UTC (6 years ago) by martin
Branch: netbsd-7-1
Changes since 1.158.4.1: +12 -2 lines
Diff to previous 1.158.4.1 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1594):

	sys/kern/uipc_mbuf.c: revision 1.182
	sys/netinet6/frag6.c: revision 1.67
	sys/netinet/ip_reass.c: revision 1.14
	sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

Revision 1.158.4.2 / (download) - annotate - [select for diffs], Thu Apr 5 11:48:13 2018 UTC (6 years ago) by martin
Branch: netbsd-7
Changes since 1.158.4.1: +12 -2 lines
Diff to previous 1.158.4.1 (colored) to branchpoint 1.158 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by maxv in ticket #1594):

	sys/kern/uipc_mbuf.c: revision 1.182
	sys/netinet6/frag6.c: revision 1.67
	sys/netinet/ip_reass.c: revision 1.14
	sys/sys/mbuf.h: revision 1.179

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:
        m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);
m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

Revision 1.181.2.2 / (download) - annotate - [select for diffs], Thu Mar 22 01:44:50 2018 UTC (6 years ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181.2.1: +22 -17 lines
Diff to previous 1.181.2.1 (colored) to branchpoint 1.181 (colored) to selected 1.198 (colored)

Synch with HEAD, resolve conflicts

Revision 1.184 / (download) - annotate - [select for diffs], Wed Mar 21 17:03:09 2018 UTC (6 years ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322
Changes since 1.183: +22 -4 lines
Diff to previous 1.183 (colored) to selected 1.198 (colored)

Localify and remove unused prototypes.

Revision 1.183 / (download) - annotate - [select for diffs], Wed Mar 21 16:26:04 2018 UTC (6 years ago) by maxv
Branch: MAIN
Changes since 1.182: +2 -15 lines
Diff to previous 1.182 (colored) to selected 1.198 (colored)

Remove these global variables. They are unused, racy, and the only thing
they do is triggering cache synchronization latencies between CPUs.

Revision 1.181.2.1 / (download) - annotate - [select for diffs], Thu Mar 15 09:12:06 2018 UTC (6 years, 1 month ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.181: +12 -2 lines
Diff to previous 1.181 (colored) to selected 1.198 (colored)

Synch with HEAD

Revision 1.182 / (download) - annotate - [select for diffs], Fri Mar 9 11:57:38 2018 UTC (6 years, 1 month ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-0315
Changes since 1.181: +12 -2 lines
Diff to previous 1.181 (colored) to selected 1.198 (colored)

Remove M_PKTHDR from secondary mbufs when reassembling packets.

This is a real problem, because I found at least one component that relies
on the fact that only the first mbuf has M_PKTHDR: far from here, in
m_splithdr, we don't update m->m_pkthdr.len if M_PKTHDR is found in a
secondary mbuf. (The initial intention there was to avoid updating
m_pkthdr.len twice, the assumption was that if M_PKTHDR is set then we're
dealing with the first mbuf.) Therefore, when handling fragmented IPsec
packets (in particular IPv6, IPv4 is a bit more complicated), we may end
up with an incorrect m_pkthdr.len after authentication or decryption. In
the case of ESP, this can lead to a remote crash on this instruction:

	m_copydata(m, m->m_pkthdr.len - 3, 3, lastthree);

m_pkthdr.len is bigger than the actual mbuf chain.

It seems possible to me to trigger this bug even if you don't have the ESP
key, because the fragmentation part is outside of the encrypted ESP
payload.

So if you MITM the target, and intercept an incoming ESP packet (which you
can't decrypt), you should be able to forge a new specially-crafted,
fragmented packet and stuff the ESP payload (still encrypted, as you
intercepted it) into it. The decryption succeeds and the target crashes.

Revision 1.172.6.1 / (download) - annotate - [select for diffs], Tue Feb 27 09:07:32 2018 UTC (6 years, 1 month ago) by martin
Branch: netbsd-8
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by mrg in ticket #593):
	sys/dev/marvell/mvxpsec.c: revision 1.2
	sys/arch/m68k/m68k/pmap_motorola.c: revision 1.70
	sys/opencrypto/crypto.c: revision 1.102
	sys/arch/sparc64/sparc64/pmap.c: revision 1.308
	sys/ufs/chfs/chfs_malloc.c: revision 1.5
	sys/arch/powerpc/oea/pmap.c: revision 1.95
	sys/sys/pool.h: revision 1.80,1.82
	sys/kern/subr_pool.c: revision 1.209-1.216,1.219-1.220
	sys/arch/alpha/alpha/pmap.c: revision 1.262
	sys/kern/uipc_mbuf.c: revision 1.173
	sys/uvm/uvm_fault.c: revision 1.202
	sys/sys/mbuf.h: revision 1.172
	sys/kern/subr_extent.c: revision 1.86
	sys/arch/x86/x86/pmap.c: revision 1.266 (via patch)
	sys/dev/dtv/dtv_scatter.c: revision 1.4

Allow only one pending call to a pool's backing allocator at a time.
Candidate fix for problems with hanging after kva fragmentation related
to PR kern/45718.

Proposed on tech-kern:
https://mail-index.NetBSD.org/tech-kern/2017/10/23/msg022472.html
Tested by bouyer@ on i386.

This makes one small change to the semantics of pool_prime and
pool_setlowat: they may fail with EWOULDBLOCK instead of ENOMEM, if
there is a pending call to the backing allocator in another thread but
we are not actually out of memory.  That is unlikely because nearly
always these are used during initialization, when the pool is not in
use.

Define the new flag too for previous commit.

pool_grow can now fail even when sleeping is ok. Catch this case in pool_get
and retry.

Assert that pool_get failure happens only with PR_NOWAIT.
This would have caught the mistake I made last week leading to null
pointer dereferences all over the place, a mistake which I evidently
poorly scheduled alongside maxv's change to the panic message on x86
for null pointer dereferences.

Since pr_lock is now used to wait for two things now (PR_GROWING and
PR_WANTED) we need to loop for the condition we wanted.
make the KASSERTMSG/panic strings consistent as '%s: [%s], __func__, wchan'
Handle the ERESTART case from pool_grow()

don't pass 0 to the pool flags
Guess pool_cache_get(pc, 0) means PR_WAITOK here.
Earlier on in the same context we use kmem_alloc(sz, KM_SLEEP).

use PR_WAITOK everywhere.
use PR_NOWAIT.

Don't use 0 for PR_NOWAIT

use PR_NOWAIT instead of 0

panic ex nihilo -- PR_NOWAITing for zerot

Add assertions that either PR_WAITOK or PR_NOWAIT are set.
- fix an assert; we can reach there if we are nowait or limitfail.
- when priming the pool and failing with ERESTART, don't decrement the number
  of pages; this avoids the issue of returning an ERESTART when we get to 0,
  and is more correct.
- simplify the pool_grow code, and don't wakeup things if we ENOMEM.

In pmap_enter_ma(), only try to allocate pves if we might need them,
and even if that fails, only fail the operation if we later discover
that we really do need them.  This implements the requirement that
pmap_enter(PMAP_CANFAIL) must not fail when replacing an existing
mapping with the first mapping of a new page, which is an unintended
consequence of the changes from the rmind-uvmplock branch in 2011.

The problem arises when pmap_enter(PMAP_CANFAIL) is used to replace an existing
pmap mapping with a mapping of a different page (eg. to resolve a copy-on-write).
If that fails and leaves the old pmap entry in place, then UVM won't hold
the right locks when it eventually retries.  This entanglement of the UVM and
pmap locking was done in rmind-uvmplock in order to improve performance,
but it also means that the UVM state and pmap state need to be kept in sync
more than they did before.  It would be possible to handle this in the UVM code
instead of in the pmap code, but these pmap changes improve the handling of
low memory situations in general, and handling this in UVM would be clunky,
so this seemed like the better way to go.

This somewhat indirectly fixes PR 52706, as well as the failing assertion
about "uvm_page_locked_p(old_pg)".  (but only on x86, various other platforms
will need their own changes to handle this issue.)
In uvm_fault_upper_enter(), if pmap_enter(PMAP_CANFAIL) fails, assert that
the pmap did not leave around a now-stale pmap mapping for an old page.
If such a pmap mapping still existed after we unlocked the vm_map,
the UVM code would not know later that it would need to lock the
lower layer object while calling the pmap to remove or replace that
stale pmap mapping.  See PR 52706 for further details.
hopefully workaround the irregularly "fork fails in init" problem.
if a pool is growing, and the grower is PR_NOWAIT, mark this.
if another caller wants to grow the pool and is also PR_NOWAIT,
busy-wait for the original caller, which should either succeed
or hard-fail fairly quickly.

implement the busy-wait by unlocking and relocking this pools
mutex and returning ERESTART.  other methods (such as having
the caller do this) were significantly more code and this hack
is fairly localised.
ok chs@ riastradh@

Don't release the lock in the PR_NOWAIT allocation. Move flags setting
after the acquiring the mutex. (from Tobias Nygren)
apply the change from arch/x86/x86/pmap.c rev. 1.266 commitid vZRjvmxG7YTHLOfA:

In pmap_enter_ma(), only try to allocate pves if we might need them,
and even if that fails, only fail the operation if we later discover
that we really do need them.  If we are replacing an existing mapping,
reuse the pv structure where possible.

This implements the requirement that pmap_enter(PMAP_CANFAIL) must not fail
when replacing an existing mapping with the first mapping of a new page,
which is an unintended consequence of the changes from the rmind-uvmplock
branch in 2011.

The problem arises when pmap_enter(PMAP_CANFAIL) is used to replace an existing
pmap mapping with a mapping of a different page (eg. to resolve a copy-on-write).
If that fails and leaves the old pmap entry in place, then UVM won't hold
the right locks when it eventually retries.  This entanglement of the UVM and
pmap locking was done in rmind-uvmplock in order to improve performance,
but it also means that the UVM state and pmap state need to be kept in sync
more than they did before.  It would be possible to handle this in the UVM code
instead of in the pmap code, but these pmap changes improve the handling of
low memory situations in general, and handling this in UVM would be clunky,
so this seemed like the better way to go.

This somewhat indirectly fixes PR 52706 on the remaining platforms where
this problem existed.

Revision 1.181 / (download) - annotate - [select for diffs], Mon Jan 22 15:05:27 2018 UTC (6 years, 2 months ago) by maxv
Branch: MAIN
CVS Tags: pgoyette-compat-base
Branch point for: pgoyette-compat
Changes since 1.180: +73 -61 lines
Diff to previous 1.180 (colored) to selected 1.198 (colored)

Style and clarify.

Revision 1.180 / (download) - annotate - [select for diffs], Mon Jan 22 10:26:38 2018 UTC (6 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.179: +6 -2 lines
Diff to previous 1.179 (colored) to selected 1.198 (colored)

m_prepend does not tolerate being given len > MHLEN, so add a panic, and
document this behavior.

Revision 1.179 / (download) - annotate - [select for diffs], Mon Jan 22 09:06:40 2018 UTC (6 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.178: +39 -28 lines
Diff to previous 1.178 (colored) to selected 1.198 (colored)

Style, no functional change.

Revision 1.178 / (download) - annotate - [select for diffs], Mon Jan 22 07:22:52 2018 UTC (6 years, 2 months ago) by maxv
Branch: MAIN
Changes since 1.177: +12 -4 lines
Diff to previous 1.177 (colored) to selected 1.198 (colored)

Fix m_prepend(). If 'm' is not a pkthdr, it doesn't make sense to use
MH_ALIGN, it should rather be M_ALIGN.

I'm wondering whether there should not be a KASSERT to make sure 'm' is
always a pkthdr.

Revision 1.177 / (download) - annotate - [select for diffs], Sun Jan 14 16:59:37 2018 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.176: +14 -14 lines
Diff to previous 1.176 (colored) to selected 1.198 (colored)

style

Revision 1.176 / (download) - annotate - [select for diffs], Mon Jan 1 12:22:59 2018 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.175: +5 -0 lines
Diff to previous 1.175 (colored) to selected 1.198 (colored)

Detect use-after-frees on mbufs with external storage, too. This is done
even when the refcount is > 1.

Again, this code is enabled by default, because it is fast and quite
useful.

Revision 1.175 / (download) - annotate - [select for diffs], Mon Jan 1 12:09:56 2018 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.174: +28 -52 lines
Diff to previous 1.174 (colored) to selected 1.198 (colored)

Don't use macros, rather inline, much clearer.

For the record, I was partly mistaken in my previous commit: even though
the macros were local, the function names were still the ones of the real
callers.

However, setting the name in m_data was not a good thing; this was a
valid pointer, and the kernel could execute a long time before figuring
out the mbuf was already freed - therefore making debugging more difficult.
And information on the caller can be obtained via ddb anyway.

Revision 1.174 / (download) - annotate - [select for diffs], Sun Dec 31 06:57:12 2017 UTC (6 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.173: +6 -17 lines
Diff to previous 1.173 (colored) to selected 1.198 (colored)

Check MT_FREE by default, and not just under DEBUG (or DIAGNOSTIC). This
code is fast, with an nonexistent overhead - and we already take care of
setting MT_FREE, so why not check it.

In addition, stop registering the function name, that's not helpful since
the MBUFFREE macro is local. Instead, set m_data to NULL, so that any
access to a freed mbuf's data after mtod() or similar will page fault.

The combination of these two changes provides a fast and efficient way of
detecting use-after-frees in the network stack.

Revision 1.146.2.5 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (6 years, 4 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.146.2.4: +110 -47 lines
Diff to previous 1.146.2.4 (colored) to branchpoint 1.146 (colored) next main 1.147 (colored) to selected 1.198 (colored)

update from HEAD

Revision 1.173 / (download) - annotate - [select for diffs], Thu Nov 9 22:21:27 2017 UTC (6 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.172: +3 -3 lines
Diff to previous 1.172 (colored) to selected 1.198 (colored)

Don't use 0 for PR_NOWAIT

Revision 1.159.2.8 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.7: +5 -7 lines
Diff to previous 1.159.2.7 (colored) to branchpoint 1.159 (colored) next main 1.160 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.168.2.3 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.168.2.2: +3 -3 lines
Diff to previous 1.168.2.2 (colored) to branchpoint 1.168 (colored) next main 1.169 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.170.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:54:02 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.170: +5 -7 lines
Diff to previous 1.170 (colored) next main 1.171 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.172 / (download) - annotate - [select for diffs], Fri Mar 31 05:44:05 2017 UTC (7 years ago) by msaitoh
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, matt-nb8-mediatek-base, matt-nb8-mediatek, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1
Branch point for: netbsd-8
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored) to selected 1.198 (colored)

 Remove extra 0x in m_print().

Revision 1.168.2.2 / (download) - annotate - [select for diffs], Mon Mar 20 06:57:47 2017 UTC (7 years ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.168.2.1: +8 -7 lines
Diff to previous 1.168.2.1 (colored) to branchpoint 1.168 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.171 / (download) - annotate - [select for diffs], Tue Mar 14 09:03:08 2017 UTC (7 years, 1 month ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320
Changes since 1.170: +4 -6 lines
Diff to previous 1.170 (colored) to selected 1.198 (colored)

Use if_acquire and if_release instead of using psref API directly

- Provide if_release for consistency to if_acquire
- Use if_acquire and if_release for ifp iterations
- Make ifnet_psref_class static

Revision 1.159.2.7 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (7 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.6: +6 -3 lines
Diff to previous 1.159.2.6 (colored) to branchpoint 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.170 / (download) - annotate - [select for diffs], Mon Jan 9 14:25:52 2017 UTC (7 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: nick-nhusb-base-20170204, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.169: +6 -3 lines
Diff to previous 1.169 (colored) to selected 1.198 (colored)

If we had an error, don't do the debug checks because they will most certainly
fail and we'll panic.

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:49:17 2016 UTC (7 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.168: +78 -24 lines
Diff to previous 1.168 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.159.2.6 / (download) - annotate - [select for diffs], Wed Oct 5 20:56:03 2016 UTC (7 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.5: +78 -24 lines
Diff to previous 1.159.2.5 (colored) to branchpoint 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.169 / (download) - annotate - [select for diffs], Tue Oct 4 14:13:21 2016 UTC (7 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-20170107, pgoyette-localcount-20161104, nick-nhusb-base-20161204, nick-nhusb-base-20161004
Changes since 1.168: +78 -24 lines
Diff to previous 1.168 (colored) to selected 1.198 (colored)

Hide MFREE now that it is not being used anymore and provide some debugging
for the location of the last free for debugging kernels.

Revision 1.159.2.5 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:20 2016 UTC (7 years, 9 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.4: +7 -8 lines
Diff to previous 1.159.2.4 (colored) to branchpoint 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.168 / (download) - annotate - [select for diffs], Thu Jun 16 02:38:40 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20160907, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.167: +4 -5 lines
Diff to previous 1.167 (colored) to selected 1.198 (colored)

Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND

Revision 1.167 / (download) - annotate - [select for diffs], Fri Jun 10 13:31:44 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.166: +4 -4 lines
Diff to previous 1.166 (colored) to selected 1.198 (colored)

Avoid storing a pointer of an interface in a mbuf

Having a pointer of an interface in a mbuf isn't safe if we remove big
kernel locks; an interface object (ifnet) can be destroyed anytime in any
packet processing and accessing such object via a pointer is racy. Instead
we have to get an object from the interface collection (ifindex2ifnet) via
an interface index (if_index) that is stored to a mbuf instead of an
pointer.

The change provides two APIs: m_{get,put}_rcvif_psref that use psref(9)
for sleep-able critical sections and m_{get,put}_rcvif that use
pserialize(9) for other critical sections. The change also adds another
API called m_get_rcvif_NOMPSAFE, that is NOT MP-safe and for transition
moratorium, i.e., it is intended to be used for places where are not
planned to be MP-ified soon.

The change adds some overhead due to psref to performance sensitive paths,
however the overhead is not serious, 2% down at worst.

Proposed on tech-kern and tech-net.

Revision 1.166 / (download) - annotate - [select for diffs], Fri Jun 10 13:27:15 2016 UTC (7 years, 10 months ago) by ozaki-r
Branch: MAIN
Changes since 1.165: +4 -4 lines
Diff to previous 1.165 (colored) to selected 1.198 (colored)

Introduce m_set_rcvif and m_reset_rcvif

The API is used to set (or reset) a received interface of a mbuf.
They are counterpart of m_get_rcvif, which will come in another
commit, hide internal of rcvif operation, and reduce the diff of
the upcoming change.

No functional change.

Revision 1.159.2.4 / (download) - annotate - [select for diffs], Sun May 29 08:44:37 2016 UTC (7 years, 10 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.3: +19 -5 lines
Diff to previous 1.159.2.3 (colored) to branchpoint 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.165 / (download) - annotate - [select for diffs], Thu May 12 02:24:16 2016 UTC (7 years, 11 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529
Changes since 1.164: +19 -5 lines
Diff to previous 1.164 (colored) to selected 1.198 (colored)

Protect ifnet list with psz and psref

The change ensures that ifnet objects in the ifnet list aren't freed during
list iterations by using pserialize(9) and psref(9).

Note that the change adds a pslist(9) for ifnet but doesn't remove the
original ifnet list (ifnet_list) to avoid breaking kvm(3) users. We
shouldn't use the original list in the kernel anymore.

Revision 1.159.2.3 / (download) - annotate - [select for diffs], Fri Apr 22 15:44:16 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.2: +5 -17 lines
Diff to previous 1.159.2.2 (colored) to branchpoint 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.164 / (download) - annotate - [select for diffs], Wed Apr 20 08:50:43 2016 UTC (7 years, 11 months ago) by knakahara
Branch: MAIN
CVS Tags: nick-nhusb-base-20160422
Changes since 1.163: +5 -17 lines
Diff to previous 1.163 (colored) to selected 1.198 (colored)

Add init function for mbuf.

some functions use mbuf as stack variable instead of allocating by m_get().
They should use this function(s) to prevent access to uninitialized fields.

Currently, the mbuf stack allocating functions are the following.
    + sys/dev/ic/bwi.c
      - bwi_rxeof()
      - bwi_encap()
    + sys/dev/ic/dp8390.c
      - dp8390_ipkdb_send()
    + sys/dev/pci/if_txp.c
      - txp_download_fw_section()
    + sys/dev/ppbus/if_plip.c
      - lptap()
    + sys/net/bpf.c
      - _pf_mtap2()
      - _pf_mtap_af()
      - _pf_mtap_sl_out()
    + sys/netisdn/i4b_ipr.c
      - ipr_rx_data_rdy()
      - ipr_tx_queue_empty()

Reviewed by kre@n.o and christos@n.o, thanks.

Revision 1.159.2.2 / (download) - annotate - [select for diffs], Tue Sep 22 12:06:07 2015 UTC (8 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.159.2.1: +5 -3 lines
Diff to previous 1.159.2.1 (colored) to branchpoint 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.163 / (download) - annotate - [select for diffs], Mon Aug 24 22:21:26 2015 UTC (8 years, 7 months ago) by pooka
Branch: MAIN
CVS Tags: nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921
Changes since 1.162: +4 -2 lines
Diff to previous 1.162 (colored) to selected 1.198 (colored)

sprinkle _KERNEL_OPT

Revision 1.162 / (download) - annotate - [select for diffs], Fri Jul 24 12:29:55 2015 UTC (8 years, 8 months ago) by maxv
Branch: MAIN
Changes since 1.161: +3 -3 lines
Diff to previous 1.161 (colored) to selected 1.198 (colored)

typo (comment)

Revision 1.159.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (9 years ago) by skrll
Branch: nick-nhusb
Changes since 1.159: +12 -3 lines
Diff to previous 1.159 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.158.4.1 / (download) - annotate - [select for diffs], Mon Feb 9 09:46:01 2015 UTC (9 years, 2 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE
Branch point for: netbsd-7-1, netbsd-7-0
Changes since 1.158: +7 -2 lines
Diff to previous 1.158 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #501):
	sys/kern/uipc_mbuf.c: revision 1.161
Correct m_len calculation for m_dup() with mbuf clusters.
Fixes kern/49650.

Revision 1.161 / (download) - annotate - [select for diffs], Sun Feb 8 14:46:30 2015 UTC (9 years, 2 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.160: +7 -2 lines
Diff to previous 1.160 (colored) to selected 1.198 (colored)

Correct m_len calculation for m_dup() with mbuf clusters.
Fixes kern/49650.

Revision 1.160 / (download) - annotate - [select for diffs], Tue Dec 2 04:43:35 2014 UTC (9 years, 4 months ago) by ozaki-r
Branch: MAIN
Changes since 1.159: +7 -3 lines
Diff to previous 1.159 (colored) to selected 1.198 (colored)

Revert "Pull if_drain routine out of m_reclaim"

The commit broke dlopen()'d rumpnet on platforms where ld.so does not
override weak aliases (e.g. musl, Solaris, potentially OS X, ...).

Requested by pooka@.

Revision 1.159 / (download) - annotate - [select for diffs], Thu Nov 27 03:15:51 2014 UTC (9 years, 4 months ago) by ozaki-r
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.158: +3 -7 lines
Diff to previous 1.158 (colored) to selected 1.198 (colored)

Pull if_drain routine out of m_reclaim

It's if-specific and should be in if.c.

No functional change.

Revision 1.146.2.4 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.146.2.3: +139 -44 lines
Diff to previous 1.146.2.3 (colored) to branchpoint 1.146 (colored) to selected 1.198 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.143.2.5 / (download) - annotate - [select for diffs], Thu May 22 11:41:03 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.143.2.4: +142 -47 lines
Diff to previous 1.143.2.4 (colored) to branchpoint 1.143 (colored) next main 1.144 (colored) to selected 1.198 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:08 2014 UTC (9 years, 11 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.151: +57 -52 lines
Diff to previous 1.151 (colored) next main 1.152 (colored) to selected 1.198 (colored)

sync with head

Revision 1.158 / (download) - annotate - [select for diffs], Tue Feb 25 18:30:11 2014 UTC (10 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.157: +2 -7 lines
Diff to previous 1.157 (colored) to selected 1.198 (colored)

Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist before
the sysctl link sets are processed, and remove redundancy.

Shaves >13kB off of an amd64 GENERIC, not to mention >1k duplicate
lines of code.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Nov 15 17:48:55 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.156: +2 -3 lines
Diff to previous 1.156 (colored) to selected 1.198 (colored)

remove trigger happy assertion. in m_adj negative lengths are valid.

Revision 1.156 / (download) - annotate - [select for diffs], Thu Nov 14 18:54:40 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.155: +28 -21 lines
Diff to previous 1.155 (colored) to selected 1.198 (colored)

- add KASSERTS on functions that don't accept M_COPYALL
- compute length for m_copyback0, m_makewritable used from ipf, is using
  M_COPYALL.

Revision 1.155 / (download) - annotate - [select for diffs], Thu Nov 14 09:21:30 2013 UTC (10 years, 5 months ago) by skrll
Branch: MAIN
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored) to selected 1.198 (colored)

Deal with M_COPYALL becoming -ve properly in m_copym0.

 I can now mount via nfs again.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Nov 14 00:50:36 2013 UTC (10 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.153: +10 -5 lines
Diff to previous 1.153 (colored) to selected 1.198 (colored)

change M_COPYALL to be -1 instead of depending on it too be "too large",
so that we check explicitly against it in all places. ok gimpy

Revision 1.153 / (download) - annotate - [select for diffs], Wed Oct 9 20:15:20 2013 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.152: +22 -24 lines
Diff to previous 1.152 (colored) to selected 1.198 (colored)

- initialize m_len m_pkthgr.len to 0 in constructors, as discussed in tech-net.
- s/MGET/m_get
- s/0/NULL

Revision 1.152 / (download) - annotate - [select for diffs], Fri Sep 20 19:13:39 2013 UTC (10 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.151: +3 -2 lines
Diff to previous 1.151 (colored) to selected 1.198 (colored)

mark mbuf as free when we return it to the pool (Beverly Schwartz)

Revision 1.151 / (download) - annotate - [select for diffs], Fri Jun 28 01:23:05 2013 UTC (10 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Branch point for: rmind-smpnet
Changes since 1.150: +12 -4 lines
Diff to previous 1.150 (colored) to selected 1.198 (colored)

Make m_copydata panics more verbose

Revision 1.150 / (download) - annotate - [select for diffs], Thu Jun 27 17:47:18 2013 UTC (10 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.149: +84 -2 lines
Diff to previous 1.149 (colored) to selected 1.198 (colored)

- add m_add() that puts an mbuf to end of a chain
- m_append() and m_align() with their family
- remove parameters from prototypes

Revision 1.146.2.3 / (download) - annotate - [select for diffs], Sun Jun 23 06:18:58 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.146.2.2: +3 -3 lines
Diff to previous 1.146.2.2 (colored) to branchpoint 1.146 (colored) to selected 1.198 (colored)

resync from head

Revision 1.149 / (download) - annotate - [select for diffs], Wed May 8 11:08:45 2013 UTC (10 years, 11 months ago) by pooka
Branch: MAIN
Changes since 1.148: +3 -3 lines
Diff to previous 1.148 (colored) to selected 1.198 (colored)

print more diagnostic info in panic message

Revision 1.146.2.2 / (download) - annotate - [select for diffs], Mon Feb 25 00:29:55 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.146.2.1: +45 -31 lines
Diff to previous 1.146.2.1 (colored) to branchpoint 1.146 (colored) to selected 1.198 (colored)

resync with head

Revision 1.145.2.1 / (download) - annotate - [select for diffs], Fri Feb 8 19:18:12 2013 UTC (11 years, 2 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE
Branch point for: netbsd-6-1
Changes since 1.145: +45 -31 lines
Diff to previous 1.145 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by rmind in ticket #777):
	usr.sbin/npf/npfctl/npfctl.c: revision 1.27
	sys/net/npf/npf_session.c: revision 1.19
	usr.sbin/npf/npftest/libnpftest/npf_mbuf_subr.c: revision 1.4
	sys/net/npf/npf_rproc.c: revision 1.5
	usr.sbin/npf/npftest/README: revision 1.3
	sys/sys/mbuf.h: revision 1.151
	sys/net/npf/npf_ruleset.c: revision 1.15
	usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.3
	sys/net/npf/npf_ruleset.c: revision 1.16
	usr.sbin/npf/npftest/libnpftest/npf_state_test.c: revision 1.4
	usr.sbin/npf/npftest/libnpftest/npf_nbuf_test.c: revision 1.4
	sys/net/npf/npf_inet.c: revision 1.19
	sys/net/npf/npf_instr.c: revision 1.15
	sys/net/npf/npf_handler.c: revision 1.24
	sys/net/npf/npf_handler.c: revision 1.25
	sys/net/npf/npf_state_tcp.c: revision 1.12
	sys/net/npf/npf_processor.c: revision 1.13
	sys/net/npf/npf_impl.h: revision 1.25
	sys/net/npf/npf_processor.c: revision 1.14
	sys/net/npf/npf_mbuf.c: revision 1.10
	sys/net/npf/npf_alg_icmp.c: revision 1.14
	sys/net/npf/npf_mbuf.c: revision 1.9
	usr.sbin/npf/npftest/libnpftest/npf_nat_test.c: revision 1.2
	usr.sbin/npf/npftest/libnpftest/npf_rule_test.c: revision 1.3
	sys/net/npf/npf_session.c: revision 1.20
	sys/net/npf/npf_alg.c: revision 1.6
	sys/kern/uipc_mbuf.c: revision 1.148
	sys/net/npf/npf_inet.c: revision 1.20
	sys/net/npf/npf.h: revision 1.25
	sys/net/npf/npf_nat.c: revision 1.18
	sys/net/npf/npf_state.c: revision 1.13
	sys/net/npf/npf_sendpkt.c: revision 1.13
	sys/net/npf/npf_ext_log.c: revision 1.2
	usr.sbin/npf/npftest/libnpftest/npf_processor_test.c: revision 1.4
	sys/net/npf/npf_ext_normalise.c: revision 1.2
- Rework NPF's nbuf interface: use advancing and ensuring as a main method.
  Eliminate unnecessary copy and simplify.  Adapt regression tests.
- Simplify ICMP ALG a little.  While here, handle ICMP ECHO for traceroute.
- Minor fixes, misc cleanup.
Silence gcc in npf_recache().
Add m_ensure_contig() routine, which is equivalent to m_pullup, but does not
destroy the mbuf chain on failure (it is kept valid).
- nbuf_ensure_contig: rework to use m_ensure_contig(9), which will not free
  the mbuf chain on failure.  Fixes some corner cases.  Improve regression
  test and sprinkle some asserts.
- npf_reassembly: clear nbuf on IPv6 reassembly failure path (partial fix).
  The problem was found and fix provided by Anthony Mallet.

Revision 1.143.2.4 / (download) - annotate - [select for diffs], Wed Jan 23 00:06:22 2013 UTC (11 years, 2 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.143.2.3: +45 -31 lines
Diff to previous 1.143.2.3 (colored) to branchpoint 1.143 (colored) to selected 1.198 (colored)

sync with head

Revision 1.148 / (download) - annotate - [select for diffs], Sat Jan 19 00:51:52 2013 UTC (11 years, 2 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base8, khorben-n900, agc-symver-base, agc-symver
Changes since 1.147: +45 -31 lines
Diff to previous 1.147 (colored) to selected 1.198 (colored)

Add m_ensure_contig() routine, which is equivalent to m_pullup, but does not
destroy the mbuf chain on failure (it is kept valid).

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:44 2012 UTC (11 years, 4 months ago) by tls
Branch: tls-maxphys
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored) to selected 1.198 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.143.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:36 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.143.2.2: +3 -3 lines
Diff to previous 1.143.2.2 (colored) to branchpoint 1.143 (colored) to selected 1.198 (colored)

sync with head

Revision 1.147 / (download) - annotate - [select for diffs], Thu Oct 18 19:33:38 2012 UTC (11 years, 6 months ago) by para
Branch: MAIN
CVS Tags: yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored) to selected 1.198 (colored)

bring comment up to reality

kmem_map => kmem_arena

Revision 1.143.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:08:12 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.143.2.1: +2 -3 lines
Diff to previous 1.143.2.1 (colored) to branchpoint 1.143 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.143.6.2 / (download) - annotate - [select for diffs], Sun Apr 29 23:05:05 2012 UTC (11 years, 11 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.143.6.1: +2 -3 lines
Diff to previous 1.143.6.1 (colored) to branchpoint 1.143 (colored) next main 1.144 (colored) to selected 1.198 (colored)

sync to latest -current.

Revision 1.146 / (download) - annotate - [select for diffs], Sun Apr 29 16:36:53 2012 UTC (11 years, 11 months ago) by dsl
Branch: MAIN
CVS Tags: yamt-pagecache-base5, jmcneill-usbmp-base9, jmcneill-usbmp-base10
Branch point for: tls-maxphys
Changes since 1.145: +2 -3 lines
Diff to previous 1.145 (colored) to selected 1.198 (colored)

Remove the unused 'struct malloc_type' args to kern_malloc/realloc/free
The M_xxx arg is left on the calls to malloc() and free(),
  maybe they could be converted to an enumeration and just saved in
  the malloc header (for deep diag use).
Remove the malloc_type from mbuf extension.
Fixes rump build as well.
Welcome to 6.99.6

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:30 2012 UTC (12 years ago) by yamt
Branch: yamt-pagecache
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored) to selected 1.198 (colored)

sync with head

Revision 1.143.6.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:33 2012 UTC (12 years, 2 months ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored) to selected 1.198 (colored)

merge to -current.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Feb 10 17:35:47 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
CVS Tags: yamt-pagecache-base4, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2
Branch point for: netbsd-6-0, netbsd-6
Changes since 1.144: +3 -3 lines
Diff to previous 1.144 (colored) to selected 1.198 (colored)

proper sizing of kmem_arena on different ports

PR port-i386/45946: Kernel locks up in VMEM system

Revision 1.144 / (download) - annotate - [select for diffs], Fri Jan 27 19:48:40 2012 UTC (12 years, 2 months ago) by para
Branch: MAIN
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored) to selected 1.198 (colored)

extending vmem(9) to be able to allocated resources for it's own needs.
simplifying uvm_map handling (no special kernel entries anymore no relocking)
make malloc(9) a thin wrapper around kmem(9)
(with private interface for interrupt safety reasons)

releng@ acknowledged

Revision 1.143 / (download) - annotate - [select for diffs], Wed Aug 31 18:31:02 2011 UTC (12 years, 7 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.142: +4 -4 lines
Diff to previous 1.142 (colored) to selected 1.198 (colored)

NULL does not need a cast

Revision 1.142 / (download) - annotate - [select for diffs], Mon Aug 8 19:10:33 2011 UTC (12 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.141: +60 -2 lines
Diff to previous 1.141 (colored) to selected 1.198 (colored)

Miscellaneous mbuf changes:

1 Add some protection against double-freeing mbufs in DIAGNOSTIC kernels.

2 Add a m_defrag() that's derived from
  sys/dev/pci/if_vge.c:vge_m_defrag().  This one copies the packet
  header.

3 Constify m_tag_find().

Revision 1.141 / (download) - annotate - [select for diffs], Wed Jul 27 14:35:34 2011 UTC (12 years, 8 months ago) by uebayasi
Branch: MAIN
Changes since 1.140: +2 -4 lines
Diff to previous 1.140 (colored) to selected 1.198 (colored)

These don't need uvm/uvm_extern.h.

Revision 1.138.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:09:39 2011 UTC (12 years, 10 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.138: +3 -4 lines
Diff to previous 1.138 (colored) next main 1.139 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.134.2.3 / (download) - annotate - [select for diffs], Tue May 31 03:05:03 2011 UTC (12 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.134.2.2: +0 -1 lines
Diff to previous 1.134.2.2 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored) to selected 1.198 (colored)

sync with head

Revision 1.140 / (download) - annotate - [select for diffs], Sun Apr 24 18:46:23 2011 UTC (12 years, 11 months ago) by rmind
Branch: MAIN
CVS Tags: rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Changes since 1.139: +2 -3 lines
Diff to previous 1.139 (colored) to selected 1.198 (colored)

- Replace few malloc(9) uses with kmem(9).
- Rename buf_malloc() to buf_alloc(), fix comments.
- Remove some unnecessary inclusions.

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Sat Mar 5 20:55:24 2011 UTC (13 years, 1 month ago) by rmind
Branch: rmind-uvmplock
Changes since 1.134.2.1: +5 -18 lines
Diff to previous 1.134.2.1 (colored) to branchpoint 1.134 (colored) to selected 1.198 (colored)

sync with head

Revision 1.139 / (download) - annotate - [select for diffs], Mon Jan 17 07:13:32 2011 UTC (13 years, 3 months ago) by uebayasi
Branch: MAIN
CVS Tags: bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored) to selected 1.198 (colored)

Include internal definitions (uvm/uvm.h) only where necessary.

Revision 1.138 / (download) - annotate - [select for diffs], Wed Nov 24 14:49:18 2010 UTC (13 years, 4 months ago) by cegger
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr
Changes since 1.137: +3 -3 lines
Diff to previous 1.137 (colored) to selected 1.198 (colored)

No need to print '0x' twice in the printing of
the mbuf flags via 'show mbuf'

Revision 1.132.2.3 / (download) - annotate - [select for diffs], Sat Nov 6 08:08:44 2010 UTC (13 years, 5 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.132.2.2: +3 -16 lines
Diff to previous 1.132.2.2 (colored) to branchpoint 1.132 (colored) next main 1.133 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.137 / (download) - annotate - [select for diffs], Thu Oct 28 14:21:50 2010 UTC (13 years, 5 months ago) by seanb
Branch: MAIN
CVS Tags: uebayasi-xip-base4
Changes since 1.136: +3 -16 lines
Diff to previous 1.136 (colored) to selected 1.198 (colored)

Always use m_split() in m_copyback() instead of its
local, abridged, version.  This closes a window where
a new mbuf (n) can be inserted where n->m_next == n.

Revision 1.132.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:47:33 2010 UTC (13 years, 8 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.132.2.1: +1 -1 lines
Diff to previous 1.132.2.1 (colored) to branchpoint 1.132 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.126.4.4 / (download) - annotate - [select for diffs], Wed Aug 11 22:54:43 2010 UTC (13 years, 8 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.4.3: +5 -31 lines
Diff to previous 1.126.4.3 (colored) to branchpoint 1.126 (colored) next main 1.127 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:17:58 2010 UTC (13 years, 10 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.134: +5 -31 lines
Diff to previous 1.134 (colored) to selected 1.198 (colored)

sync with head

Revision 1.136 / (download) - annotate - [select for diffs], Tue May 11 20:21:56 2010 UTC (13 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base3, uebayasi-xip-base2
Changes since 1.135: +3 -3 lines
Diff to previous 1.135 (colored) to selected 1.198 (colored)

remove unnecessary #ifdef

Revision 1.132.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:13 2010 UTC (13 years, 11 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.132: +43 -38 lines
Diff to previous 1.132 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.135 / (download) - annotate - [select for diffs], Fri Apr 16 02:57:15 2010 UTC (14 years ago) by rmind
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.134: +4 -30 lines
Diff to previous 1.134 (colored) to selected 1.198 (colored)

Remove mclpool_allocator, which is unnecessary since mb_map removal.

Revision 1.126.4.3 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:20 2010 UTC (14 years, 1 month ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.4.2: +44 -13 lines
Diff to previous 1.126.4.2 (colored) to branchpoint 1.126 (colored) to selected 1.198 (colored)

sync with head

Revision 1.134 / (download) - annotate - [select for diffs], Mon Feb 8 22:55:36 2010 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored) to selected 1.198 (colored)

Handle rump like the direct mapping case.

Revision 1.133 / (download) - annotate - [select for diffs], Mon Feb 8 19:02:33 2010 UTC (14 years, 2 months ago) by joerg
Branch: MAIN
Changes since 1.132: +44 -13 lines
Diff to previous 1.132 (colored) to selected 1.198 (colored)

Remove separate mb_map. The nmbclusters is computed at boot time based
on the amount of physical memory and limited by NMBCLUSTERS if present.
Architectures without direct mapping also limit it based on the kmem_map
size, which is used as backing store. On i386 and ARM, the maximum KVA
used for mbuf clusters is limited to 64MB by default.

The old default limits and limits based on GATEWAY have been removed.
key_registered_sb_max is hard-wired to a value derived from 2048
clusters.

Revision 1.130.2.1 / (download) - annotate - [select for diffs], Wed May 13 17:21:58 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.130: +4 -3 lines
Diff to previous 1.130 (colored) next main 1.131 (colored) to selected 1.198 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.126.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:49 2009 UTC (14 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126.4.1: +27 -19 lines
Diff to previous 1.126.4.1 (colored) to branchpoint 1.126 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.128.4.2 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:01 2009 UTC (14 years, 11 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.128.4.1: +4 -3 lines
Diff to previous 1.128.4.1 (colored) to branchpoint 1.128 (colored) next main 1.129 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.128.6.1 / (download) - annotate - [select for diffs], Tue Apr 7 23:43:16 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.128: +3 -2 lines
Diff to previous 1.128 (colored) next main 1.129 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by bouyer in ticket #674):
	sys/kern/uipc_mbuf.c: revision 1.132
m_split0(): If the newly allocated mbuf holds only the header,
don't forget to set m_len to 0. Otherwise whatever will compute the size
of this chain (including s_split() itself if called again on this chain)
will get it wrong, leading to various issues.
Bug exposed by the NFS server code with linux clients using TCP mounts.

Revision 1.132 / (download) - annotate - [select for diffs], Sun Apr 5 16:31:21 2009 UTC (15 years ago) by bouyer
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, uebayasi-xip-base, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, matt-premerge-20091211, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base
Branch point for: uebayasi-xip
Changes since 1.131: +3 -2 lines
Diff to previous 1.131 (colored) to selected 1.198 (colored)

m_split0(): If the newly allocated mbuf holds only the header,
don't forget to set m_len to 0. Otherwise whatever will compute the size
of this chain (including s_split() itself if called again on this chain)
will get it wrong, leading to various issues.

Bug exposed by the NFS server code with linux clients using TCP mounts.

Revision 1.131 / (download) - annotate - [select for diffs], Sun Mar 15 17:14:40 2009 UTC (15 years, 1 month ago) by cegger
Branch: MAIN
Changes since 1.130: +3 -3 lines
Diff to previous 1.130 (colored) to selected 1.198 (colored)

ansify function definitions

Revision 1.128.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:40 2009 UTC (15 years, 2 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.128: +22 -15 lines
Diff to previous 1.128 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.124.6.4 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:20 2009 UTC (15 years, 3 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.124.6.3: +20 -13 lines
Diff to previous 1.124.6.3 (colored) to branchpoint 1.124 (colored) next main 1.125 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.130 / (download) - annotate - [select for diffs], Tue Dec 16 22:35:37 2008 UTC (15 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2, mjf-devfs2-base
Branch point for: jym-xensuspend
Changes since 1.129: +4 -5 lines
Diff to previous 1.129 (colored) to selected 1.198 (colored)

replace bitmask_snprintf(9) with snprintb(3)

Revision 1.128.2.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:09 2008 UTC (15 years, 4 months ago) by haad
Branch: haad-dm
Changes since 1.128: +20 -12 lines
Diff to previous 1.128 (colored) next main 1.129 (colored) to selected 1.198 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Dec 7 20:58:46 2008 UTC (15 years, 4 months ago) by pooka
Branch: MAIN
CVS Tags: haad-nbase2, haad-dm-base2, haad-dm-base
Changes since 1.128: +20 -12 lines
Diff to previous 1.128 (colored) to selected 1.198 (colored)

Move some sysctl node creations away from linksets and into the
constructors for subsystems.

XXX: CTLFLAG_PERMANENT is non-sensible.

Revision 1.127.2.1 / (download) - annotate - [select for diffs], Thu Sep 18 04:31:44 2008 UTC (15 years, 7 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.127: +6 -6 lines
Diff to previous 1.127 (colored) next main 1.128 (colored) to selected 1.198 (colored)

Sync with wrstuden-revivesa-base-2.

Revision 1.127.4.1 / (download) - annotate - [select for diffs], Thu Jul 3 18:38:12 2008 UTC (15 years, 9 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.127: +6 -6 lines
Diff to previous 1.127 (colored) next main 1.128 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.124.6.3 / (download) - annotate - [select for diffs], Wed Jul 2 19:08:20 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.124.6.2: +4 -4 lines
Diff to previous 1.124.6.2 (colored) to branchpoint 1.124 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.128 / (download) - annotate - [select for diffs], Wed Jul 2 14:47:34 2008 UTC (15 years, 9 months ago) by matt
Branch: MAIN
CVS Tags: wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, simonb-wapbl-nbase, simonb-wapbl-base, netbsd-5-base, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.127: +6 -6 lines
Diff to previous 1.127 (colored) to selected 1.198 (colored)

Switch from KASSERT to CTASSERT for those asserts testing sizes of types.

Revision 1.124.6.2 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:13 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.124.6.1: +10 -19 lines
Diff to previous 1.124.6.1 (colored) to branchpoint 1.124 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.126.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:11 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.126: +2 -9 lines
Diff to previous 1.126 (colored) next main 1.127 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.126.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:27 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.126: +2 -9 lines
Diff to previous 1.126 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.127 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:05 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-nfs-mp-base2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, hpcarm-cleanup-nbase
Branch point for: wrstuden-revivesa, simonb-wapbl
Changes since 1.126: +2 -9 lines
Diff to previous 1.126 (colored) to selected 1.198 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.126 / (download) - annotate - [select for diffs], Wed Apr 9 05:11:20 2008 UTC (16 years ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.125: +12 -14 lines
Diff to previous 1.125 (colored) to selected 1.198 (colored)

Make the percpu API a little more friendly:
- percpu_getptr() is now called percpu_getref() and implicitly disables
  preemption (via crit_enter()) when it is called.
- Added percpu_putref() which implicitly reenables preemption (via
  crit_exit()).

Revision 1.124.6.1 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:05 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.124: +83 -9 lines
Diff to previous 1.124 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.125 / (download) - annotate - [select for diffs], Mon Mar 24 12:24:37 2008 UTC (16 years ago) by yamt
Branch: MAIN
CVS Tags: ad-socklock-base1
Changes since 1.124: +83 -9 lines
Diff to previous 1.124 (colored) to selected 1.198 (colored)

merge yamt-lazymbuf branch.

Revision 1.121.14.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:01 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.121.14.2: +225 -10 lines
Diff to previous 1.121.14.2 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored) to selected 1.198 (colored)

sync with HEAD

Revision 1.100.2.26 / (download) - annotate - [select for diffs], Wed Feb 27 09:29:48 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.25: +0 -4 lines
Diff to previous 1.100.2.25 (colored) next main 1.101 (colored) to selected 1.198 (colored)

remove mbuf ext_lock which is no longer used.

Revision 1.100.2.25 / (download) - annotate - [select for diffs], Wed Feb 27 09:24:06 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.24: +0 -35 lines
Diff to previous 1.100.2.24 (colored) to selected 1.198 (colored)

drop lazy mapping of mbuf external storage for now, because:
	- it's currently broken wrt asm code.  (cpu_in_cksum)
	- there are other approaches worth to consider.  eg. sf_buf

Revision 1.121.20.2 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:48 2008 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.121.20.1: +225 -10 lines
Diff to previous 1.121.20.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.100.2.24 / (download) - annotate - [select for diffs], Thu Feb 14 10:19:59 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.23: +7 -1 lines
Diff to previous 1.100.2.23 (colored) to selected 1.198 (colored)

m_ext_free: optimize the common case.

Revision 1.100.2.23 / (download) - annotate - [select for diffs], Mon Feb 11 14:54:36 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.22: +1 -1 lines
Diff to previous 1.100.2.22 (colored) to selected 1.198 (colored)

m_ext_free: don't use atomic op where unnecessary.

Revision 1.100.2.22 / (download) - annotate - [select for diffs], Tue Feb 5 09:47:28 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.21: +4 -6 lines
Diff to previous 1.100.2.21 (colored) to selected 1.198 (colored)

use mutex_spin_enter.

Revision 1.100.2.21 / (download) - annotate - [select for diffs], Mon Jan 21 09:46:29 2008 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.20: +227 -11 lines
Diff to previous 1.100.2.20 (colored) to selected 1.198 (colored)

sync with head

Revision 1.123.6.1 / (download) - annotate - [select for diffs], Sat Jan 19 12:15:27 2008 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xeni386
Changes since 1.123: +223 -8 lines
Diff to previous 1.123 (colored) next main 1.124 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.124 / (download) - annotate - [select for diffs], Thu Jan 17 14:49:29 2008 UTC (16 years, 3 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Branch point for: mjf-devfs2
Changes since 1.123: +225 -10 lines
Diff to previous 1.123 (colored) to selected 1.198 (colored)

make some mbuf related statistics per-cpu.

Revision 1.121.14.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:27 2008 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.121.14.1: +3 -3 lines
Diff to previous 1.121.14.1 (colored) to branchpoint 1.121 (colored) to selected 1.198 (colored)

sync with HEAD

Revision 1.100.2.20 / (download) - annotate - [select for diffs], Fri Dec 7 17:41:58 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.19: +4 -38 lines
Diff to previous 1.100.2.19 (colored) to selected 1.198 (colored)

use atomic ops unconditionally.

Revision 1.121.20.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:57 2007 UTC (16 years, 5 months ago) by mjf
Branch: mjf-devfs
Changes since 1.121: +25 -23 lines
Diff to previous 1.121 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.121.18.2 / (download) - annotate - [select for diffs], Sun Nov 18 19:35:51 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.121.18.1: +1 -1 lines
Diff to previous 1.121.18.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.100.2.19 / (download) - annotate - [select for diffs], Thu Nov 15 14:41:03 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.18: +12 -0 lines
Diff to previous 1.100.2.18 (colored) to selected 1.198 (colored)

mcl_inc_reference, mcl_dec_and_test_reference: use atomic ops if x86.

Revision 1.100.2.18 / (download) - annotate - [select for diffs], Thu Nov 15 14:00:51 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.17: +0 -1 lines
Diff to previous 1.100.2.17 (colored) to selected 1.198 (colored)

update a comment

Revision 1.100.2.17 / (download) - annotate - [select for diffs], Thu Nov 15 13:59:39 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.16: +3 -3 lines
Diff to previous 1.100.2.16 (colored) to selected 1.198 (colored)

mbpool_cache -> mb_cache

Revision 1.100.2.16 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:56 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.15: +25 -23 lines
Diff to previous 1.100.2.15 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.121.12.2 / (download) - annotate - [select for diffs], Wed Nov 14 19:04:47 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.121.12.1: +3 -3 lines
Diff to previous 1.121.12.1 (colored) to branchpoint 1.121 (colored) next main 1.122 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.123 / (download) - annotate - [select for diffs], Wed Nov 14 14:11:57 2007 UTC (16 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-merge1, bouyer-xenamd64-base2, bouyer-xenamd64-base
Branch point for: bouyer-xeni386
Changes since 1.122: +3 -3 lines
Diff to previous 1.122 (colored) to selected 1.198 (colored)

m_print: avoid sign extention of m_flags.

Revision 1.121.18.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:35 2007 UTC (16 years, 5 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.121: +24 -22 lines
Diff to previous 1.121 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.121.12.1 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:16 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.121: +24 -22 lines
Diff to previous 1.121 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.121.14.1 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:09 2007 UTC (16 years, 5 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.121: +24 -22 lines
Diff to previous 1.121 (colored) to selected 1.198 (colored)

sync with -HEAD

Revision 1.122 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:24 2007 UTC (16 years, 5 months ago) by ad
Branch: MAIN
Changes since 1.121: +24 -22 lines
Diff to previous 1.121 (colored) to selected 1.198 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.120.2.3 / (download) - annotate - [select for diffs], Thu Nov 1 21:05:21 2007 UTC (16 years, 5 months ago) by ad
Branch: vmlocking
Changes since 1.120.2.2: +6 -3 lines
Diff to previous 1.120.2.2 (colored) next main 1.121 (colored) to selected 1.198 (colored)

m_reclaim: acquire kernel_lock as this can be called from the pagedaemon.

Revision 1.100.2.15 / (download) - annotate - [select for diffs], Sat Oct 27 11:40:55 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.14: +10 -12 lines
Diff to previous 1.100.2.14 (colored) to selected 1.198 (colored)

make ext_lock kmutex_t.

Revision 1.100.2.14 / (download) - annotate - [select for diffs], Mon Sep 3 14:58:03 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.13: +3 -3 lines
Diff to previous 1.100.2.13 (colored) to selected 1.198 (colored)

kill caddr_t.

Revision 1.100.2.13 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:17 2007 UTC (16 years, 7 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.12: +21 -21 lines
Diff to previous 1.100.2.12 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.120.2.2 / (download) - annotate - [select for diffs], Sat Sep 1 12:56:49 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.120.2.1: +20 -21 lines
Diff to previous 1.120.2.1 (colored) to selected 1.198 (colored)

Update for pool_cache API changes.

Revision 1.116.4.3 / (download) - annotate - [select for diffs], Sat Mar 24 14:56:06 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.116.4.2: +5 -4 lines
Diff to previous 1.116.4.2 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.120.2.1 / (download) - annotate - [select for diffs], Tue Mar 13 16:51:58 2007 UTC (17 years, 1 month ago) by ad
Branch: vmlocking
Changes since 1.120: +5 -4 lines
Diff to previous 1.120 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.121 / (download) - annotate - [select for diffs], Mon Mar 12 18:18:34 2007 UTC (17 years, 1 month ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-x86pmap-base, yamt-x86pmap, yamt-idlelwp-base8, vmlocking-base, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, mjf-ufs-trans, matt-mips64-base, matt-mips64, jmcneill-base, hpcarm-cleanup
Branch point for: mjf-devfs, matt-armv6, jmcneill-pm, bouyer-xenamd64
Changes since 1.120: +5 -4 lines
Diff to previous 1.120 (colored) to selected 1.198 (colored)

Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.

Revision 1.116.4.2 / (download) - annotate - [select for diffs], Mon Mar 12 05:58:44 2007 UTC (17 years, 1 month ago) by rmind
Branch: yamt-idlelwp
Changes since 1.116.4.1: +18 -19 lines
Diff to previous 1.116.4.1 (colored) to branchpoint 1.116 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.120 / (download) - annotate - [select for diffs], Sun Mar 4 14:33:57 2007 UTC (17 years, 1 month ago) by yamt
Branch: MAIN
Branch point for: vmlocking
Changes since 1.119: +3 -4 lines
Diff to previous 1.119 (colored) to selected 1.198 (colored)

fix a fallout from caddr_t changes.

Revision 1.119 / (download) - annotate - [select for diffs], Sun Mar 4 06:03:10 2007 UTC (17 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.118: +18 -18 lines
Diff to previous 1.118 (colored) to selected 1.198 (colored)

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.116.4.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:54:33 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-idlelwp
Changes since 1.116: +5 -5 lines
Diff to previous 1.116 (colored) to selected 1.198 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.100.2.12 / (download) - annotate - [select for diffs], Mon Feb 26 09:11:19 2007 UTC (17 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.11: +11 -11 lines
Diff to previous 1.100.2.11 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.118 / (download) - annotate - [select for diffs], Thu Feb 22 06:34:45 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.117: +5 -5 lines
Diff to previous 1.117 (colored) to selected 1.198 (colored)

TRUE -> true, FALSE -> false

Revision 1.117 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:05 2007 UTC (17 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.116: +4 -4 lines
Diff to previous 1.116 (colored) to selected 1.198 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.100.2.11 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:07 2006 UTC (17 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.10: +14 -13 lines
Diff to previous 1.100.2.10 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.113.4.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:45 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.113.4.1: +6 -6 lines
Diff to previous 1.113.4.1 (colored) to branchpoint 1.113 (colored) next main 1.114 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.113.2.1 / (download) - annotate - [select for diffs], Sat Nov 18 21:39:23 2006 UTC (17 years, 5 months ago) by ad
Branch: newlock2
Changes since 1.113: +11 -11 lines
Diff to previous 1.113 (colored) next main 1.114 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.116 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:59 2006 UTC (17 years, 5 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm
Branch point for: yamt-idlelwp
Changes since 1.115: +6 -6 lines
Diff to previous 1.115 (colored) to selected 1.198 (colored)

remove some __unused from function parameters.

Revision 1.113.4.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:11 2006 UTC (17 years, 5 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.113: +15 -15 lines
Diff to previous 1.113 (colored) to selected 1.198 (colored)

sync with head

Revision 1.115 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:19 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.114: +6 -6 lines
Diff to previous 1.114 (colored) to selected 1.198 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.114 / (download) - annotate - [select for diffs], Tue Oct 10 21:49:14 2006 UTC (17 years, 6 months ago) by dogcow
Branch: MAIN
Changes since 1.113: +11 -11 lines
Diff to previous 1.113 (colored) to selected 1.198 (colored)

change the MOWNER_INIT define to take two args; fix extant struct mowner
decls to use it. Makes options MBUFTRACE compile again and not whinge about
missing structure declarations. (Also makes initialization consistent.)

Revision 1.105.6.5 / (download) - annotate - [select for diffs], Thu Sep 14 12:31:48 2006 UTC (17 years, 7 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.105.6.4: +4 -3 lines
Diff to previous 1.105.6.4 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.105.2.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:57:17 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.105: +64 -20 lines
Diff to previous 1.105 (colored) next main 1.106 (colored) to selected 1.198 (colored)

sync with head

Revision 1.111.4.1 / (download) - annotate - [select for diffs], Fri Sep 8 19:54:57 2006 UTC (17 years, 7 months ago) by rpaulo
Branch: abandoned-netbsd-4
Changes since 1.111: +1 -1 lines
Diff to previous 1.111 (colored) next main 1.112 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by pavel in ticket #135):
	sys/kern/uipc_mbuf.c: revision 1.112
MCLAIM the correct mbuf. PR kern/34162.

Revision 1.92.6.3 / (download) - annotate - [select for diffs], Fri Sep 8 12:06:51 2006 UTC (17 years, 7 months ago) by ghen
Branch: netbsd-3
CVS Tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-1-RELEASE, netbsd-3-1
Changes since 1.92.6.2: +2 -2 lines
Diff to previous 1.92.6.2 (colored) to branchpoint 1.92 (colored) next main 1.93 (colored) to selected 1.198 (colored)

Pull up following revision(s) (requested by pavel in ticket #1503):
	sys/kern/uipc_mbuf.c: revision 1.112
MCLAIM the correct mbuf. PR kern/34162.

Revision 1.113 / (download) - annotate - [select for diffs], Sun Sep 3 21:12:14 2006 UTC (17 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Changes since 1.112: +4 -3 lines
Diff to previous 1.112 (colored) to selected 1.198 (colored)

use c99 initializers

Revision 1.105.6.4 / (download) - annotate - [select for diffs], Fri Aug 11 15:45:47 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.105.6.3: +3 -3 lines
Diff to previous 1.105.6.3 (colored) to branchpoint 1.105 (colored) to selected 1.198 (colored)

sync with head

Revision 1.112 / (download) - annotate - [select for diffs], Tue Aug 8 15:53:40 2006 UTC (17 years, 8 months ago) by pavel
Branch: MAIN
CVS Tags: yamt-pdpolicy-base8, yamt-pdpolicy-base7
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored) to selected 1.198 (colored)

MCLAIM the correct mbuf. PR kern/34162.

Revision 1.100.2.10 / (download) - annotate - [select for diffs], Fri Jul 7 12:30:51 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.9: +10 -9 lines
Diff to previous 1.100.2.9 (colored) to selected 1.198 (colored)

- fix typos and compilation problems in uipc_mbuf.c rev.1.100.2.8.
- m_ext_free: fix the recursive call case.
- change return value of mcl_dec_and_test_reference.
- tweak assertions.

Revision 1.100.2.9 / (download) - annotate - [select for diffs], Fri Jul 7 12:25:37 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.8: +2 -2 lines
Diff to previous 1.100.2.8 (colored) to selected 1.198 (colored)

m_print: print raw ext_refcnt rather than MCLISREFERENCED.

Revision 1.100.2.8 / (download) - annotate - [select for diffs], Thu Jul 6 12:32:31 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.7: +30 -18 lines
Diff to previous 1.100.2.7 (colored) to selected 1.198 (colored)

tweak code so that it can be switched to atomic operations later easily.

Revision 1.100.2.7 / (download) - annotate - [select for diffs], Thu Jul 6 12:18:45 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.6: +31 -2 lines
Diff to previous 1.100.2.6 (colored) to selected 1.198 (colored)

- move some macros from mbuf.h to uipc_mbuf.c.
- remove unused MCLBUFREF.

Revision 1.105.6.3 / (download) - annotate - [select for diffs], Mon Jun 26 12:52:57 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.105.6.2: +3 -2 lines
Diff to previous 1.105.6.2 (colored) to branchpoint 1.105 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.100.2.6 / (download) - annotate - [select for diffs], Wed Jun 21 15:09:39 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.5: +151 -38 lines
Diff to previous 1.100.2.5 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.110.2.1 / (download) - annotate - [select for diffs], Mon Jun 19 04:07:16 2006 UTC (17 years, 10 months ago) by chap
Branch: chap-midi
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored) next main 1.111 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.105.4.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:38:09 2006 UTC (17 years, 10 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.105.4.1: +3 -2 lines
Diff to previous 1.105.4.1 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.111 / (download) - annotate - [select for diffs], Thu May 25 14:27:28 2006 UTC (17 years, 10 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base6, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, chap-midi-nbase, chap-midi-base, abandoned-netbsd-4-base
Branch point for: abandoned-netbsd-4
Changes since 1.110: +3 -2 lines
Diff to previous 1.110 (colored) to selected 1.198 (colored)

move wait points for kva from upper layers to vm_map.  PR/33185 #1.

XXX there is a concern about interaction with kva fragmentation.
see: http://mail-index.NetBSD.org/tech-kern/2006/05/11/0000.html

Revision 1.106.2.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:41 2006 UTC (17 years, 10 months ago) by tron
Branch: peter-altq
Changes since 1.106.2.1: +5 -4 lines
Diff to previous 1.106.2.1 (colored) to branchpoint 1.106 (colored) next main 1.107 (colored) to selected 1.198 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.105.6.2 / (download) - annotate - [select for diffs], Wed May 24 10:58:42 2006 UTC (17 years, 10 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.105.6.1: +5 -4 lines
Diff to previous 1.105.6.1 (colored) to branchpoint 1.105 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.105.4.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:39:59 2006 UTC (17 years, 11 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.105: +60 -18 lines
Diff to previous 1.105 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.105.8.1 / (download) - annotate - [select for diffs], Wed Apr 19 05:14:00 2006 UTC (18 years ago) by elad
Branch: elad-kernelauth
Changes since 1.105: +60 -18 lines
Diff to previous 1.105 (colored) next main 1.106 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.110 / (download) - annotate - [select for diffs], Sat Apr 15 04:58:14 2006 UTC (18 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pdpolicy-base5, elad-kernelauth-base
Branch point for: chap-midi
Changes since 1.109: +5 -4 lines
Diff to previous 1.109 (colored) to selected 1.198 (colored)

Coverity CID 848: Protect against NULL deref.

Revision 1.105.6.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:40 2006 UTC (18 years ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.105: +57 -16 lines
Diff to previous 1.105 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.106.2.1 / (download) - annotate - [select for diffs], Tue Mar 28 09:42:27 2006 UTC (18 years ago) by tron
Branch: peter-altq
Changes since 1.106: +47 -15 lines
Diff to previous 1.106 (colored) to selected 1.198 (colored)

Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.

Revision 1.109 / (download) - annotate - [select for diffs], Sun Mar 19 10:07:19 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.108: +43 -14 lines
Diff to previous 1.108 (colored) to selected 1.198 (colored)

m_copyback0:
- unify two copies of code to extend a chain.
- when extending a chain,
	- use trailing space of the last mbuf if any.
	- use mbuf cluster if appropriate.

Revision 1.108 / (download) - annotate - [select for diffs], Sat Mar 18 18:17:19 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.107: +8 -5 lines
Diff to previous 1.107 (colored) to selected 1.198 (colored)

m_print: fix the previous correctly.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Mar 18 17:37:17 2006 UTC (18 years, 1 month ago) by chris
Branch: MAIN
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (colored) to selected 1.198 (colored)

Fix Coverity CID 1473: Static buffer overrun.

Add a counter for the number of pages, so that we print out the ext_pgs
values.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Mar 15 10:40:30 2006 UTC (18 years, 1 month ago) by yamt
Branch: MAIN
CVS Tags: peter-altq-base
Branch point for: peter-altq
Changes since 1.105: +12 -3 lines
Diff to previous 1.105 (colored) to selected 1.198 (colored)

m_copyback0: add comments and assertions.

Revision 1.104.2.1 / (download) - annotate - [select for diffs], Wed Feb 1 14:52:20 2006 UTC (18 years, 2 months ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.104: +63 -2 lines
Diff to previous 1.104 (colored) next main 1.105 (colored) to selected 1.198 (colored)

sync with head.

Revision 1.105 / (download) - annotate - [select for diffs], Tue Jan 24 13:02:58 2006 UTC (18 years, 2 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy, simonb-timecounters, rpaulo-netinet-merge-pcb, elad-kernelauth
Changes since 1.104: +63 -2 lines
Diff to previous 1.104 (colored) to selected 1.198 (colored)

add ddb "sh mbuf" command.

Revision 1.104 / (download) - annotate - [select for diffs], Mon Dec 26 18:45:27 2005 UTC (18 years, 3 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored) to selected 1.198 (colored)

u_intN_t -> uintN_t

Revision 1.69.2.10 / (download) - annotate - [select for diffs], Sun Dec 11 10:29:12 2005 UTC (18 years, 4 months ago) by christos
Branch: ktrace-lwp
Changes since 1.69.2.9: +8 -8 lines
Diff to previous 1.69.2.9 (colored) next main 1.70 (colored) to selected 1.198 (colored)

Sync with head.

Revision 1.103 / (download) - annotate - [select for diffs], Thu Dec 8 03:11:14 2005 UTC (18 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: ktrace-lwp-base
Changes since 1.102: +8 -8 lines
Diff to previous 1.102 (colored) to selected 1.198 (colored)

Sprinkle static.

Revision 1.69.2.9 / (download) - annotate - [select for diffs], Thu Nov 10 14:09:45 2005 UTC (18 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.8: +28 -20 lines
Diff to previous 1.69.2.8 (colored) to selected 1.198 (colored)

Sync with HEAD. Here we go again...

Revision 1.102 / (download) - annotate - [select for diffs], Wed Nov 9 17:54:12 2005 UTC (18 years, 5 months ago) by skrll
Branch: MAIN
CVS Tags: yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead
Changes since 1.101: +3 -3 lines
Diff to previous 1.101 (colored) to selected 1.198 (colored)

Typo in comment.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Aug 18 00:30:58 2005 UTC (18 years, 8 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, thorpej-vnode-attr-base, thorpej-vnode-attr
Changes since 1.100: +21 -13 lines
Diff to previous 1.100 (colored) to selected 1.198 (colored)

- introduce M_MOVE_PKTHDR and use it where appropriate.
  intended to be mostly API compatible with openbsd/freebsd.
- remove a glue #define in netipsec/ipsec_osdep.h.

Revision 1.100.2.5 / (download) - annotate - [select for diffs], Fri Jul 15 09:21:44 2005 UTC (18 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.4: +6 -2 lines
Diff to previous 1.100.2.4 (colored) to selected 1.198 (colored)

m_mapin: fix an spl botch.

Revision 1.100.2.4 / (download) - annotate - [select for diffs], Thu Jul 7 12:42:25 2005 UTC (18 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.3: +8 -2 lines
Diff to previous 1.100.2.3 (colored) to selected 1.198 (colored)

defer mapping only when defined(__HAVE_LAZY_MBUF).

Revision 1.100.2.3 / (download) - annotate - [select for diffs], Thu Jul 7 12:07:38 2005 UTC (18 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.2: +31 -3 lines
Diff to previous 1.100.2.2 (colored) to selected 1.198 (colored)

sosend_loan: defer mapping of mbuf external data pages.
mtod: map mbuf external data pages if needed.

Revision 1.100.2.2 / (download) - annotate - [select for diffs], Thu Jul 7 12:02:18 2005 UTC (18 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100.2.1: +58 -2 lines
Diff to previous 1.100.2.1 (colored) to selected 1.198 (colored)

de-inline m_ext_free.

Revision 1.100.2.1 / (download) - annotate - [select for diffs], Thu Jul 7 11:53:25 2005 UTC (18 years, 9 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.100: +3 -7 lines
Diff to previous 1.100 (colored) to selected 1.198 (colored)

adapt to mbuf.h changes.

Revision 1.92.6.2 / (download) - annotate - [select for diffs], Thu Jun 9 17:56:13 2005 UTC (18 years, 10 months ago) by snj
Branch: netbsd-3
CVS Tags: netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Changes since 1.92.6.1: +2 -2 lines
Diff to previous 1.92.6.1 (colored) to branchpoint 1.92 (colored) to selected 1.198 (colored)

Pull up revision 1.98 (requested by tron in ticket #387):
restore NetBSD RCS tag in __KERNEL_RCSID() macro

Revision 1.92.6.1 / (download) - annotate - [select for diffs], Thu Jun 9 17:53:17 2005 UTC (18 years, 10 months ago) by snj
Branch: netbsd-3
Changes since 1.92: +1 -1 lines
Diff to previous 1.92 (colored) to selected 1.198 (colored)

Pull up revision 1.96 (requested by tron in ticket #387):
Add missing RCS id. Problem pointed out by Jukka Salmi.

Revision 1.100 / (download) - annotate - [select for diffs], Mon Jun 6 06:06:50 2005 UTC (18 years, 10 months ago) by martin
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.99: +3 -3 lines
Diff to previous 1.99 (colored) to selected 1.198 (colored)

Since we decided "const struct mbuf *" would not do the right thing (tm),
remove ~all const from mbuf pointers.

Revision 1.99 / (download) - annotate - [select for diffs], Mon Jun 6 04:50:28 2005 UTC (18 years, 10 months ago) by martin
Branch: MAIN
Changes since 1.98: +3 -3 lines
Diff to previous 1.98 (colored) to selected 1.198 (colored)

Constify the source arg of m_copydata

Revision 1.98 / (download) - annotate - [select for diffs], Thu Jun 2 15:48:11 2005 UTC (18 years, 10 months ago) by explorer
Branch: MAIN
Changes since 1.97: +2 -2 lines
Diff to previous 1.97 (colored) to selected 1.198 (colored)

restore NetBSD RCS tag in __KERNEL_RCSID() macro

Revision 1.97 / (download) - annotate - [select for diffs], Thu Jun 2 15:19:28 2005 UTC (18 years, 10 months ago) by tron
Branch: MAIN
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored) to selected 1.198 (colored)

Change first argument of m_copydata() back to "struct mbuf *" because
m_copydata() might eventually modify the "mbuf" structure to support
lazy mbuf mapping as pointed out by YAMAMOTO Takashi on "tech-net".

Revision 1.96 / (download) - annotate - [select for diffs], Thu Jun 2 12:58:16 2005 UTC (18 years, 10 months ago) by tron
Branch: MAIN
Changes since 1.95: +1 -1 lines
Diff to previous 1.95 (colored) to selected 1.198 (colored)

Add missing RCS id. Problem pointed out by Jukka Salmi.

Revision 1.95 / (download) - annotate - [select for diffs], Thu Jun 2 12:42:10 2005 UTC (18 years, 10 months ago) by tron
Branch: MAIN
Changes since 1.94: +1 -1 lines
Diff to previous 1.94 (colored) to selected 1.198 (colored)

Fix bad botch invented in last change.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Jun 2 10:34:59 2005 UTC (18 years, 10 months ago) by tron
Branch: MAIN
Changes since 1.93: +7 -7 lines
Diff to previous 1.93 (colored) to selected 1.198 (colored)

Change the first argument of m_copydata() to "const struct mbuf *" (which
doesn't require any implementation changes). This will allow us to get
rid off a lot of nasty type casts.

Revision 1.90.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:24 2005 UTC (18 years, 11 months ago) by kent
Branch: kent-audio2
Changes since 1.90: +6 -4 lines
Diff to previous 1.90 (colored) next main 1.91 (colored) to selected 1.198 (colored)

sync with -current

Revision 1.69.2.8 / (download) - annotate - [select for diffs], Fri Apr 1 14:30:57 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.7: +4 -4 lines
Diff to previous 1.69.2.7 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Apr 1 11:59:37 2005 UTC (19 years ago) by yamt
Branch: MAIN
CVS Tags: kent-audio2-base
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored) to selected 1.198 (colored)

merge yamt-km branch.
- don't use managed mappings/backing objects for wired memory allocations.
  save some resources like pv_entry.  also fix (most of) PR/27030.
- simplify kernel memory management API.
- simplify pmap bootstrap of some ports.
- some related cleanups.

Revision 1.69.2.7 / (download) - annotate - [select for diffs], Fri Feb 4 11:47:42 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.6: +4 -3 lines
Diff to previous 1.69.2.6 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.92.2.1 / (download) - annotate - [select for diffs], Tue Jan 25 12:59:35 2005 UTC (19 years, 2 months ago) by yamt
Branch: yamt-km
Changes since 1.92: +2 -2 lines
Diff to previous 1.92 (colored) next main 1.93 (colored) to selected 1.198 (colored)

convert to new apis.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Jan 24 21:25:09 2005 UTC (19 years, 2 months ago) by matt
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, netbsd-3-base
Branch point for: yamt-km, netbsd-3
Changes since 1.91: +2 -1 lines
Diff to previous 1.91 (colored) to selected 1.198 (colored)

Add IFNET_FOREACH and IFADDR_FOREACH macros and start using them.

Revision 1.69.2.6 / (download) - annotate - [select for diffs], Mon Jan 24 08:35:36 2005 UTC (19 years, 2 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.5: +5 -4 lines
Diff to previous 1.69.2.5 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Jan 23 18:41:56 2005 UTC (19 years, 2 months ago) by matt
Branch: MAIN
Changes since 1.90: +3 -2 lines
Diff to previous 1.90 (colored) to selected 1.198 (colored)

Change initialzie of domains to use link sets.  Switch to using STAILQ.
Add a convenience macro DOMAIN_FOREACH to interate through the domain.

Revision 1.69.2.5 / (download) - annotate - [select for diffs], Tue Nov 2 07:53:23 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.4: +8 -7 lines
Diff to previous 1.69.2.4 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.90 / (download) - annotate - [select for diffs], Wed Oct 20 22:10:31 2004 UTC (19 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: kent-audio2
Changes since 1.89: +6 -5 lines
Diff to previous 1.89 (colored) to selected 1.198 (colored)

Make panic messages print out what condition they though was panic-worthy
instead of a 1 word message.

Revision 1.69.2.4 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:07 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.3: +2 -4 lines
Diff to previous 1.69.2.3 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.80.2.5 / (download) - annotate - [select for diffs], Fri Oct 8 03:05:26 2004 UTC (19 years, 6 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2
Changes since 1.80.2.4: +1 -3 lines
Diff to previous 1.80.2.4 (colored) to branchpoint 1.80 (colored) next main 1.81 (colored) to selected 1.198 (colored)

Pullup rev 1.89 (requested by is in ticket #895)

Some code likes to mix MT_HEADER and MT_DATA. Revert this assertion until
the usage of MT_HEADER vs. MT_DATA is better defined and implemented.

Revision 1.89 / (download) - annotate - [select for diffs], Tue Oct 5 12:19:29 2004 UTC (19 years, 6 months ago) by is
Branch: MAIN
Changes since 1.88: +0 -2 lines
Diff to previous 1.88 (colored) to selected 1.198 (colored)

Some code likes to mix MT_HEADER and MT_DATA. Revert this assertion until
the usage of MT_HEADER vs. MT_DATA is better defined and implemented.

Revision 1.69.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:17 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.2: +0 -0 lines
Diff to previous 1.69.2.2 (colored) to selected 1.198 (colored)

Fix the sync with head I botched.

Revision 1.69.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:04 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69.2.1: +227 -16 lines
Diff to previous 1.69.2.1 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Sep 17 23:24:03 2004 UTC (19 years, 7 months ago) by enami
Branch: MAIN
Changes since 1.87: +1 -1 lines
Diff to previous 1.87 (colored) to selected 1.198 (colored)

Delete m_tag from a mbuf being non-pkthdr mbuf rather than newly becoming
pkthdr mbuf.

Revision 1.80.2.4 / (download) - annotate - [select for diffs], Sat Sep 11 22:06:58 2004 UTC (19 years, 7 months ago) by he
Branch: netbsd-2-0
CVS Tags: netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1
Changes since 1.80.2.3: +2 -2 lines
Diff to previous 1.80.2.3 (colored) to branchpoint 1.80 (colored) to selected 1.198 (colored)

Pull up revision 1.87 (requested by yamt in ticket #841):
  Restore behaviour of m_split() on M_PKTHDR which was
  unintentionally changed when m_copyback_cow() was added.

Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 11 19:55:19 2004 UTC (19 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.86: +1 -1 lines
Diff to previous 1.86 (colored) to selected 1.198 (colored)

m_split: restore a behaviour on M_PKTHDR, which was unintentionaly
changed when i added m_copyback_cow.

Revision 1.80.2.3 / (download) - annotate - [select for diffs], Sat Sep 11 11:13:52 2004 UTC (19 years, 7 months ago) by he
Branch: netbsd-2-0
Changes since 1.80.2.2: +221 -12 lines
Diff to previous 1.80.2.2 (colored) to branchpoint 1.80 (colored) to selected 1.198 (colored)

Pull up revisions 1.84-1.85 (requested by yamt in ticket #831):
  Add an assertion to detect write to a read-only mbuf.
  Add m_copyback_cow and m_makewritable.

Revision 1.86 / (download) - annotate - [select for diffs], Wed Sep 8 12:00:28 2004 UTC (19 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.85: +8 -5 lines
Diff to previous 1.85 (colored) to selected 1.198 (colored)

m_copyback, m_copyback_cow, m_copydata:
- caddr_t -> void *
- constify.
partly from openbsd.

Revision 1.85 / (download) - annotate - [select for diffs], Mon Sep 6 09:43:30 2004 UTC (19 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.84: +221 -13 lines
Diff to previous 1.84 (colored) to selected 1.198 (colored)

add m_copyback_cow and m_makewritable.

Revision 1.69.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:57 2004 UTC (19 years, 8 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.69: +170 -105 lines
Diff to previous 1.69 (colored) to selected 1.198 (colored)

Sync with HEAD

Revision 1.84 / (download) - annotate - [select for diffs], Wed Jul 21 12:06:46 2004 UTC (19 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored) to selected 1.198 (colored)

m_copyback: add an assertion to detect write attempts to a read-only mbuf.

Revision 1.80.2.2 / (download) - annotate - [select for diffs], Wed Jul 14 11:07:35 2004 UTC (19 years, 9 months ago) by tron
Branch: netbsd-2-0
Changes since 1.80.2.1: +6 -3 lines
Diff to previous 1.80.2.1 (colored) to branchpoint 1.80 (colored) to selected 1.198 (colored)

Pull up revision 1.83 (requested by jonathan in ticket #648):
Rename MBUFTRACE helper function m_claim() to m_claimm(),
for consistency with M_FREE() and m_freem().  Affected files:
sys/mbuf.h
kern/uipc_socket2.c
kern/uipc_mbuf.c
net/if_ethersubr.c
netatalk/ddp_input.c
nfs/nfs_socket.c

Revision 1.83 / (download) - annotate - [select for diffs], Thu Jun 24 04:15:50 2004 UTC (19 years, 9 months ago) by jonathan
Branch: MAIN
Changes since 1.82: +6 -3 lines
Diff to previous 1.82 (colored) to selected 1.198 (colored)

Rename MBUFTRACE helper function m_claim() to m_claimm(),
for consistency with M_FREE() and m_freem().  Affected files:

sys/mbuf.h
kern/uipc_socket2.c
kern/uipc_mbuf.c
net/if_ethersubr.c
netatalk/ddp_input.c
nfs/nfs_socket.c

Revision 1.80.2.1 / (download) - annotate - [select for diffs], Wed May 26 20:14:14 2004 UTC (19 years, 10 months ago) by he
Branch: netbsd-2-0
Changes since 1.80: +18 -10 lines
Diff to previous 1.80 (colored) to selected 1.198 (colored)

Pull up revision 1.82 (requested by atatat in ticket #388):
  Add remaining sysctl descriptions under kern subtree.

Revision 1.82 / (download) - annotate - [select for diffs], Tue May 25 04:30:32 2004 UTC (19 years, 10 months ago) by atatat
Branch: MAIN
Changes since 1.81: +18 -10 lines
Diff to previous 1.81 (colored) to selected 1.198 (colored)

Remaining sysctl descriptions under kern subtree

Revision 1.81 / (download) - annotate - [select for diffs], Thu Apr 22 01:01:40 2004 UTC (19 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.80: +3 -3 lines
Diff to previous 1.80 (colored) to selected 1.198 (colored)

Constify protosw arrays.  This can reduce the kernel .data section by
over 4K (if all the network protocols) are loaded.

Revision 1.80 / (download) - annotate - [select for diffs], Wed Mar 24 15:34:53 2004 UTC (20 years ago) by atatat
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.79: +22 -13 lines
Diff to previous 1.79 (colored) to selected 1.198 (colored)

Tango on sysctl_createv() and flags.  The flags have all been renamed,
and sysctl_createv() now uses more arguments.

Revision 1.79 / (download) - annotate - [select for diffs], Tue Mar 23 13:22:05 2004 UTC (20 years ago) by junyoung
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored) to selected 1.198 (colored)

Nuke __P().

Revision 1.78 / (download) - annotate - [select for diffs], Tue Mar 9 06:37:59 2004 UTC (20 years, 1 month ago) by yamt
Branch: MAIN
Changes since 1.77: +3 -4 lines
Diff to previous 1.77 (colored) to selected 1.198 (colored)

m_cat: assert mbuf types only when coalescing them by copying.
mbuf n often have 0-sized "headers" and their types don't matter much.

PR/24713 from Darrin B. Jewell.

Revision 1.77 / (download) - annotate - [select for diffs], Thu Feb 26 02:30:04 2004 UTC (20 years, 1 month ago) by itojun
Branch: MAIN
Changes since 1.76: +3 -4 lines
Diff to previous 1.76 (colored) to selected 1.198 (colored)

m_cat() - if it is safe, copy data portion into 1st mbuf even if 1st mbuf
is M_EXT mbuf.

Revision 1.76 / (download) - annotate - [select for diffs], Wed Jan 21 02:11:20 2004 UTC (20 years, 3 months ago) by atatat
Branch: MAIN
Changes since 1.75: +6 -6 lines
Diff to previous 1.75 (colored) to selected 1.198 (colored)

Fix the kern.mbuf tunables.

Revision 1.75 / (download) - annotate - [select for diffs], Thu Dec 4 19:38:24 2003 UTC (20 years, 4 months ago) by atatat
Branch: MAIN
Changes since 1.74: +120 -82 lines
Diff to previous 1.74 (colored) to selected 1.198 (colored)

Dynamic sysctl.

Gone are the old kern_sysctl(), cpu_sysctl(), hw_sysctl(),
vfs_sysctl(), etc, routines, along with sysctl_int() et al.  Now all
nodes are registered with the tree, and nodes can be added (or
removed) easily, and I/O to and from the tree is handled generically.

Since the nodes are registered with the tree, the mapping from name to
number (and back again) can now be discovered, instead of having to be
hard coded.  Adding new nodes to the tree is likewise much simpler --
the new infrastructure handles almost all the work for simple types,
and just about anything else can be done with a small helper function.

All existing nodes are where they were before (numerically speaking),
so all existing consumers of sysctl information should notice no
difference.

PS - I'm sorry, but there's a distinct lack of documentation at the
moment.  I'm working on sysctl(3/8/9) right now, and I promise to
watch out for buses.

Revision 1.74 / (download) - annotate - [select for diffs], Fri Oct 3 20:56:11 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.73: +5 -2 lines
Diff to previous 1.73 (colored) to selected 1.198 (colored)

when dropping M_PKTHDR, need to free m_tag associated with it.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Sep 7 12:04:13 2003 UTC (20 years, 7 months ago) by yamt
Branch: MAIN
Changes since 1.72: +4 -2 lines
Diff to previous 1.72 (colored) to selected 1.198 (colored)

assert mbuf chains m_cat'ed are of the same type.

Revision 1.72 / (download) - annotate - [select for diffs], Thu Sep 4 04:10:32 2003 UTC (20 years, 7 months ago) by itojun
Branch: MAIN
Changes since 1.71: +5 -3 lines
Diff to previous 1.71 (colored) to selected 1.198 (colored)

clarify comment on m_cat().

Revision 1.71 / (download) - annotate - [select for diffs], Fri Aug 15 02:59:32 2003 UTC (20 years, 8 months ago) by simonb
Branch: MAIN
Changes since 1.70: +18 -13 lines
Diff to previous 1.70 (colored) to selected 1.198 (colored)

Return NULL instead of 0 for functions that return pointers.
Sprinkle some KNF whitespace.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Aug 7 16:31:58 2003 UTC (20 years, 8 months ago) by agc
Branch: MAIN
Changes since 1.69: +3 -7 lines
Diff to previous 1.69 (colored) to selected 1.198 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.69 / (download) - annotate - [select for diffs], Mon Jun 23 11:02:06 2003 UTC (20 years, 9 months ago) by martin
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.68: +4 -2 lines
Diff to previous 1.68 (colored) to selected 1.198 (colored)

Make sure to include opt_foo.h if a defflag option FOO is used.

Revision 1.68 / (download) - annotate - [select for diffs], Tue May 27 09:03:46 2003 UTC (20 years, 10 months ago) by simonb
Branch: MAIN
Changes since 1.67: +3 -3 lines
Diff to previous 1.67 (colored) to selected 1.198 (colored)

Fix tyop in a comment.

Revision 1.67 / (download) - annotate - [select for diffs], Fri Apr 18 01:24:20 2003 UTC (21 years ago) by simonb
Branch: MAIN
Changes since 1.66: +3 -2 lines
Diff to previous 1.66 (colored) to selected 1.198 (colored)

Add a KASSERT to make sure that "sizeof(struct mbuf)" is MSIZE.
Extra insurance for Steve Woodford's recent <sys/mbuf.h> patch.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Apr 12 02:49:25 2003 UTC (21 years ago) by thorpej
Branch: MAIN
Changes since 1.65: +69 -2 lines
Diff to previous 1.65 (colored) to selected 1.198 (colored)

Add two new mbuf routines:
* m_apply(), which applies a function to each mbuf in chain
  starting at a specified offset, for a specified length.
* m_getptr(), which returns a pointer to the mbuf, as well as
  the offset into that mbuf, corresponding to an offset from
  the beginning of an mbuf chain.

From OpenBSD, cleaned up slightly by me.

Revision 1.65 / (download) - annotate - [select for diffs], Wed Apr 9 18:38:03 2003 UTC (21 years ago) by thorpej
Branch: MAIN
Changes since 1.64: +23 -4 lines
Diff to previous 1.64 (colored) to selected 1.198 (colored)

* Use a pool_cache constructor to record the physical address of mbufs
  in the mbuf header.
* Use the new cached paddr feature of the pool_cache API to record
  the physical address of mbuf clusters.  (We cannot use a ctor for
  clusters, since clusters have no constructed form; they are merely
  buffers).

Bus_dma back-ends may use the cached physical addresses to save having to
extract the physical address from virtual.

* Provide space in m_ext recording the vm_page *'s for an SOSEND_LOAN_CHUNK-
  sized non-cluster external buffer.  Use this in the sosend_loan code to
  save having to extract the physical address from virtual and then look
  up the vm_page *'s.

* Provide an indication that an external buffer is mapped read-only at
  the MMU.  Set this flag for the external buffer in the sosend_loan
  case, since loaned pages are always mapped read-only.  Bus_dma back-ends
  may use this information to save cache flushing, since a cache flush of
  a read-only mapping is redundant on some architectures (the cache would
  have already been flushed when making the mapping read-only).

Part 2 in a series of simple patches contributed by Wasabi Systems
to improve network performance.

Revision 1.64 / (download) - annotate - [select for diffs], Wed Feb 26 06:31:11 2003 UTC (21 years, 1 month ago) by matt
Branch: MAIN
Changes since 1.63: +81 -3 lines
Diff to previous 1.63 (colored) to selected 1.198 (colored)

Add MBUFTRACE kernel option.
Do a little mbuf rework while here.  Change all uses of MGET*(*, M_WAIT, *)
to m_get*(M_WAIT, *).  These are not performance critical and making them
call m_get saves considerable space.  Add m_clget analogue of MCLGET and
make corresponding change for M_WAIT uses.
Modify netinet, gem, fxp, tulip, nfs to support MBUFTRACE.
Begin to change netstat to use sysctl.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Feb 1 06:23:44 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.62: +4 -2 lines
Diff to previous 1.62 (colored) to selected 1.198 (colored)

Add extensible malloc types, adapted from FreeBSD.  This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.

Revision 1.62 / (download) - annotate - [select for diffs], Fri Jan 31 04:55:52 2003 UTC (21 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.61: +27 -73 lines
Diff to previous 1.61 (colored) to selected 1.198 (colored)

ANSI'ify.

Revision 1.52.2.7 / (download) - annotate - [select for diffs], Fri Oct 18 02:44:56 2002 UTC (21 years, 6 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.52.2.6: +0 -1 lines
Diff to previous 1.52.2.6 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.198 (colored)

Catch up to -current.

Revision 1.52.4.5 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:18 2002 UTC (21 years, 6 months ago) by jdolecek
Branch: kqueue
Changes since 1.52.4.4: +2 -3 lines
Diff to previous 1.52.4.4 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.198 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.61 / (download) - annotate - [select for diffs], Wed Sep 25 22:21:45 2002 UTC (21 years, 6 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Changes since 1.60: +2 -3 lines
Diff to previous 1.60 (colored) to selected 1.198 (colored)

Don't include <sys/map.h>.

Revision 1.52.4.4 / (download) - annotate - [select for diffs], Fri Sep 6 08:48:15 2002 UTC (21 years, 7 months ago) by jdolecek
Branch: kqueue
Changes since 1.52.4.3: +52 -2 lines
Diff to previous 1.52.4.3 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

sync kqueue branch with HEAD

Revision 1.52.2.6 / (download) - annotate - [select for diffs], Thu Aug 1 02:46:26 2002 UTC (21 years, 8 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.52.2.5: +50 -0 lines
Diff to previous 1.52.2.5 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Catch up to -current.

Revision 1.59.6.1 / (download) - annotate - [select for diffs], Mon Jul 15 10:36:40 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.59: +52 -2 lines
Diff to previous 1.59 (colored) next main 1.60 (colored) to selected 1.198 (colored)

catch up with -current.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Jun 30 22:40:32 2002 UTC (21 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: gehenna-devsw-base
Changes since 1.59: +52 -2 lines
Diff to previous 1.59 (colored) to selected 1.198 (colored)

Changes to allow the IPv4 and IPv6 layers to align headers themseves,
as necessary:
* Implement a new mbuf utility routine, m_copyup(), is is like
  m_pullup(), except that it always prepends and copies, rather
  than only doing so if the desired length is larger than m->m_len.
  m_copyup() also allows an offset into the destination mbuf, which
  allows space for packet headers, in the forwarding case.
* Add *_HDR_ALIGNED_P() macros for IP, IPv6, ICMP, and IGMP.  These
  macros expand to 1 if __NO_STRICT_ALIGNMENT is defined, so that
  architectures which do not have strict alignment constraints don't
  pay for the test or visit the new align-if-needed path.
* Use the new macros to check if a header needs to be aligned, or to
  assert that it already is, as appropriate.

Note: This code is still somewhat experimental.  However, the new
code path won't be visited if individual device drivers continue
to guarantee that packets are delivered to layer 3 already properly
aligned (which are rules that are already in use).

Revision 1.52.2.5 / (download) - annotate - [select for diffs], Mon Apr 1 07:48:01 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.52.2.4: +19 -56 lines
Diff to previous 1.52.2.4 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.52.4.3 / (download) - annotate - [select for diffs], Sat Mar 16 16:01:52 2002 UTC (22 years, 1 month ago) by jdolecek
Branch: kqueue
Changes since 1.52.4.2: +20 -57 lines
Diff to previous 1.52.4.2 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Catch up with -current.

Revision 1.59 / (download) - annotate - [select for diffs], Sat Mar 9 01:46:33 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, eeh-devprop-base, eeh-devprop
Branch point for: gehenna-devsw
Changes since 1.58: +6 -45 lines
Diff to previous 1.58 (colored) to selected 1.198 (colored)

Make mbpool and mclpool use the new drain hook facaility.  Adjust
m_reclaim() to match the drain hook signature.  This allows us to
delete m_retry() and m_retryhdr(), as the pool allocator will now
perform the reclaimation step for us.

From art@openbsd.org.

Revision 1.58 / (download) - annotate - [select for diffs], Fri Mar 8 20:48:41 2002 UTC (22 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.57: +15 -13 lines
Diff to previous 1.57 (colored) to selected 1.198 (colored)

Pool deals fairly well with physical memory shortage, but it doesn't
deal with shortages of the VM maps where the backing pages are mapped
(usually kmem_map).  Try to deal with this:

* Group all information about the backend allocator for a pool in a
  separate structure.  The pool references this structure, rather than
  the individual fields.
* Change the pool_init() API accordingly, and adjust all callers.
* Link all pools using the same backend allocator on a list.
* The backend allocator is responsible for waiting for physical memory
  to become available, but will still fail if it cannot callocate KVA
  space for the pages.  If this happens, carefully drain all pools using
  the same backend allocator, so that some KVA space can be freed.
* Change pool_reclaim() to indicate if it actually succeeded in freeing
  some pages, and use that information to make draining easier and more
  efficient.
* Get rid of PR_URGENT.  There was only one use of it, and it could be
  dealt with by the caller.

From art@openbsd.org.

Revision 1.52.2.4 / (download) - annotate - [select for diffs], Thu Feb 28 04:14:47 2002 UTC (22 years, 1 month ago) by nathanw
Branch: nathanw_sa
Changes since 1.52.2.3: +3 -3 lines
Diff to previous 1.52.2.3 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Catch up to -current.

Revision 1.57 / (download) - annotate - [select for diffs], Tue Feb 12 00:52:33 2002 UTC (22 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: ifpoll-base
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.198 (colored)

const char *mclpool_warnmsg -> const char mclpool_warnmsg[]

Noted by Matt Thomas.

Revision 1.52.4.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:00:13 2002 UTC (22 years, 3 months ago) by thorpej
Branch: kqueue
Changes since 1.52.4.1: +7 -4 lines
Diff to previous 1.52.4.1 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Sync kqueue branch with -current.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Wed Nov 14 19:16:46 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.52.2.2: +6 -2 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Catch up to -current.

Revision 1.54.2.1 / (download) - annotate - [select for diffs], Mon Nov 12 21:18:58 2001 UTC (22 years, 5 months ago) by thorpej
Branch: thorpej-mips-cache
Changes since 1.54: +6 -2 lines
Diff to previous 1.54 (colored) next main 1.55 (colored) to selected 1.198 (colored)

Sync the thorpej-mips-cache branch with -current.

Revision 1.56 / (download) - annotate - [select for diffs], Mon Nov 12 15:25:31 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
CVS Tags: thorpej-mips-cache-base
Changes since 1.55: +4 -1 lines
Diff to previous 1.55 (colored) to selected 1.198 (colored)

add RCSIDs

Revision 1.55 / (download) - annotate - [select for diffs], Mon Oct 29 07:02:31 2001 UTC (22 years, 5 months ago) by simonb
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored) to selected 1.198 (colored)

Don't need to include <uvm/uvm_extern.h> just to include <sys/sysctl.h>
anymore.

Revision 1.53.2.1 / (download) - annotate - [select for diffs], Mon Oct 1 12:46:56 2001 UTC (22 years, 6 months ago) by fvdl
Branch: thorpej-devvp
Changes since 1.53: +2 -3 lines
Diff to previous 1.53 (colored) next main 1.54 (colored) to selected 1.198 (colored)

Catch up with -current.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Fri Sep 21 22:36:27 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.52.2.1: +2 -3 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored) to selected 1.198 (colored)

Catch up to -current.

Revision 1.54 / (download) - annotate - [select for diffs], Sat Sep 15 20:36:37 2001 UTC (22 years, 7 months ago) by chs
Branch: MAIN
CVS Tags: thorpej-devvp-base3, thorpej-devvp-base2, post-chs-ubcperf
Branch point for: thorpej-mips-cache
Changes since 1.53: +2 -3 lines
Diff to previous 1.53 (colored) to selected 1.198 (colored)

a whole bunch of changes to improve performance and robustness under load:

 - remove special treatment of pager_map mappings in pmaps.  this is
   required now, since I've removed the globals that expose the address range.
   pager_map now uses pmap_kenter_pa() instead of pmap_enter(), so there's
   no longer any need to special-case it.
 - eliminate struct uvm_vnode by moving its fields into struct vnode.
 - rewrite the pageout path.  the pager is now responsible for handling the
   high-level requests instead of only getting control after a bunch of work
   has already been done on its behalf.  this will allow us to UBCify LFS,
   which needs tighter control over its pages than other filesystems do.
   writing a page to disk no longer requires making it read-only, which
   allows us to write wired pages without causing all kinds of havoc.
 - use a new PG_PAGEOUT flag to indicate that a page should be freed
   on behalf of the pagedaemon when it's unlocked.  this flag is very similar
   to PG_RELEASED, but unlike PG_RELEASED, PG_PAGEOUT can be cleared if the
   pageout fails due to eg. an indirect-block buffer being locked.
   this allows us to remove the "version" field from struct vm_page,
   and together with shrinking "loan_count" from 32 bits to 16,
   struct vm_page is now 4 bytes smaller.
 - no longer use PG_RELEASED for swap-backed pages.  if the page is busy
   because it's being paged out, we can't release the swap slot to be
   reallocated until that write is complete, but unlike with vnodes we
   don't keep a count of in-progress writes so there's no good way to
   know when the write is done.  instead, when we need to free a busy
   swap-backed page, just sleep until we can get it busy ourselves.
 - implement a fast-path for extending writes which allows us to avoid
   zeroing new pages.  this substantially reduces cpu usage.
 - encapsulate the data used by the genfs code in a struct genfs_node,
   which must be the first element of the filesystem-specific vnode data
   for filesystems which use genfs_{get,put}pages().
 - eliminate many of the UVM pagerops, since they aren't needed anymore
   now that the pager "put" operation is a higher-level operation.
 - enhance the genfs code to allow NFS to use the genfs_{get,put}pages
   instead of a modified copy.
 - clean up struct vnode by removing all the fields that used to be used by
   the vfs_cluster.c code (which we don't use anymore with UBC).
 - remove kmem_object and mb_object since they were useless.
   instead of allocating pages to these objects, we now just allocate
   pages with no object.  such pages are mapped in the kernel until they
   are freed, so we can use the mapping to find the page to free it.
   this allows us to remove splvm() protection in several places.

The sum of all these changes improves write throughput on my
decstation 5000/200 to within 1% of the rate of NetBSD 1.5
and reduces the elapsed time for "make release" of a NetBSD 1.5
source tree on my 128MB pc to 10% less than a 1.5 kernel took.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Fri Aug 24 00:11:41 2001 UTC (22 years, 7 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.52: +8 -2 lines
Diff to previous 1.52 (colored) to selected 1.198 (colored)

Catch up with -current.

Revision 1.52.4.1 / (download) - annotate - [select for diffs], Fri Aug 3 04:13:43 2001 UTC (22 years, 8 months ago) by lukem
Branch: kqueue
Changes since 1.52: +8 -2 lines
Diff to previous 1.52 (colored) to selected 1.198 (colored)

update to -current

Revision 1.53 / (download) - annotate - [select for diffs], Thu Jul 26 19:05:04 2001 UTC (22 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-devvp-base, pre-chs-ubcperf
Branch point for: thorpej-devvp
Changes since 1.52: +8 -2 lines
Diff to previous 1.52 (colored) to selected 1.198 (colored)

Use pool_cache_*() for mbufs and clusters.  While we don't use the
ctor/dtor feature, it's still faster to allocate from the cache groups
than it is from the pool (cache groups are analogous to "magazines"
in the Solaris SLAB allocator).

Revision 1.45.4.2 / (download) - annotate - [select for diffs], Sun Feb 4 19:18:12 2001 UTC (23 years, 2 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001
Changes since 1.45.4.1: +1 -5 lines
Diff to previous 1.45.4.1 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored) to selected 1.198 (colored)

Pull up revision 1.51 (requested by itojun):
  Make sure every m_aux will be freed.

Revision 1.43.2.3 / (download) - annotate - [select for diffs], Thu Jan 18 09:23:46 2001 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.43.2.2: +1 -1 lines
Diff to previous 1.43.2.2 (colored) next main 1.44 (colored) to selected 1.198 (colored)

Sync with head (for UBC+NFS fixes, mostly).

Revision 1.52 / (download) - annotate - [select for diffs], Sun Jan 14 02:06:22 2001 UTC (23 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa, kqueue
Changes since 1.51: +2 -2 lines
Diff to previous 1.51 (colored) to selected 1.198 (colored)

Change some low-hanging splimp() calls to splvm().

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Wed Nov 22 16:05:30 2000 UTC (23 years, 4 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.43.2.1: +1 -5 lines
Diff to previous 1.43.2.1 (colored) to selected 1.198 (colored)

Sync with HEAD.

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:09:13 2000 UTC (23 years, 5 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.43: +51 -9 lines
Diff to previous 1.43 (colored) to selected 1.198 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.51 / (download) - annotate - [select for diffs], Tue Nov 14 20:05:28 2000 UTC (23 years, 5 months ago) by itojun
Branch: MAIN
Changes since 1.50: +1 -5 lines
Diff to previous 1.50 (colored) to selected 1.198 (colored)

make sure every m_aux will be freed.
there are direct use of MFREE() from sys/kern.
(we experienced no memory leak so far, but if we use m_aux for other purposes,
we will need this change)

Revision 1.45.4.1 / (download) - annotate - [select for diffs], Sat Aug 19 07:55:31 2000 UTC (23 years, 8 months ago) by itojun
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-RELEASE, netbsd-1-5-BETA2, netbsd-1-5-BETA
Changes since 1.45: +19 -4 lines
Diff to previous 1.45 (colored) to selected 1.198 (colored)

pullup 1.48 -> 1.50 (approved by releng-1-5)
repair m_dup().  specifically, now it is safe against non-MCLBYTES external
mbuf.  noone seem to be using this function at this moment.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Aug 18 16:19:22 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.49: +17 -16 lines
Diff to previous 1.49 (colored) to selected 1.198 (colored)

repair m_dup().  specifically, now it is safe against non-MCLBYTES cluster
mbuf.  noone seem to be using this function at this moment.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Aug 18 14:23:48 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.48: +7 -1 lines
Diff to previous 1.48 (colored) to selected 1.198 (colored)

disable m_dup(), as it makes false assumption on cluster mbuf and unsafe
(does not do the right thing).

Revision 1.48 / (download) - annotate - [select for diffs], Fri Aug 18 14:12:47 2000 UTC (23 years, 8 months ago) by itojun
Branch: MAIN
Changes since 1.47: +9 -1 lines
Diff to previous 1.47 (colored) to selected 1.198 (colored)

add a comment about false assumption made by m_dup()

Revision 1.47 / (download) - annotate - [select for diffs], Tue Jun 27 17:41:44 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.46: +1 -3 lines
Diff to previous 1.46 (colored) to selected 1.198 (colored)

remove include of <vm/vm.h>

Revision 1.46 / (download) - annotate - [select for diffs], Mon Jun 26 14:21:15 2000 UTC (23 years, 9 months ago) by mrg
Branch: MAIN
Changes since 1.45: +1 -2 lines
Diff to previous 1.45 (colored) to selected 1.198 (colored)

remove/move more mach vm header files:

	<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.

Revision 1.45 / (download) - annotate - [select for diffs], Wed Mar 1 12:49:28 2000 UTC (24 years, 1 month ago) by itojun
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-ALPHA2, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Changes since 1.44: +5 -1 lines
Diff to previous 1.44 (colored) to selected 1.198 (colored)

introduce m->m_pkthdr.aux to hold random data which needs to be passed
between protocol handlers.

ipsec socket pointers, ipsec decryption/auth information, tunnel
decapsulation information are in my mind - there can be several other usage.
at this moment, we use this for ipsec socket pointer passing.  this will
avoid reuse of m->m_pkthdr.rcvif in ipsec code.

due to the change, MHLEN will be decreased by sizeof(void *) - for example,
for i386, MHLEN was 100 bytes, but is now 96 bytes.
we may want to increase MSIZE from 128 to 256 for some of our architectures.

take caution if you use it for keeping some data item for long period
of time - use extra caution on M_PREPEND() or m_adj(), as they may result
in loss of m->m_pkthdr.aux pointer (and mbuf leak).

this will bump kernel version.

(as discussed in tech-net, tested in kame tree)

Revision 1.43.6.1 / (download) - annotate - [select for diffs], Mon Dec 27 18:35:53 1999 UTC (24 years, 3 months ago) by wrstuden
Branch: wrstuden-devbsize
Changes since 1.43: +30 -4 lines
Diff to previous 1.43 (colored) next main 1.44 (colored) to selected 1.198 (colored)

Pull up to last week's -current.

Revision 1.43.4.1 / (download) - annotate - [select for diffs], Mon Nov 15 00:41:49 1999 UTC (24 years, 5 months ago) by fvdl
Branch: fvdl-softdep
Changes since 1.43: +30 -4 lines
Diff to previous 1.43 (colored) next main 1.44 (colored) to selected 1.198 (colored)

Sync with -current

Revision 1.44 / (download) - annotate - [select for diffs], Wed Oct 27 14:23:27 1999 UTC (24 years, 5 months ago) by itojun
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, fvdl-softdep-base, comdex-fall-1999-base, comdex-fall-1999, chs-ubc2-newbase
Changes since 1.43: +30 -4 lines
Diff to previous 1.43 (colored) to selected 1.198 (colored)

add mbuf deep-copy fnudtion, m_dup().
NOTE: if you use m_dup(), your additional kernel code can become
incompatible with 4.xBSD or other *BSD.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Aug 5 02:24:29 1999 UTC (24 years, 8 months ago) by thorpej
Branch: MAIN
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Changes since 1.42: +4 -4 lines
Diff to previous 1.42 (colored) to selected 1.198 (colored)

Add some more diagnostic information to the 3 different `panic("m_copym")'
calls.

Revision 1.40.4.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:24:05 1999 UTC (24 years, 10 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.40: +126 -12 lines
Diff to previous 1.40 (colored) next main 1.41 (colored) to selected 1.198 (colored)

Sync w/ -current.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Apr 26 22:04:28 1999 UTC (24 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.41: +126 -12 lines
Diff to previous 1.41 (colored) to selected 1.198 (colored)

More improvements to mbuf and mbuf cluster allocation:

- Initialize mbpool and mclpool with msize and mclbytes, respectively,
so that those values may be patched and have an actual affect on the
next system reboot.

- Set low water marks on mbpool (default: 16) and mclpool (default: 8).
This should be of great help for diskless systems, which need to allocate
mbufs in order to clean dirty pages; the low water marks increase the
chances of this being possible to do in memory starvation situations.

- Add support for getting/setting some mbuf-related parameters via sysctl.
* msize and mclsize (read-only)
* nmbclusters (read-only unless the platform has direct-mapped pool pages,
in which case the value can be increased).
* mblowat and mcllowat (read/write)

Revision 1.41 / (download) - annotate - [select for diffs], Sun Apr 25 03:03:03 1999 UTC (24 years, 11 months ago) by simonb
Branch: MAIN
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored) to selected 1.198 (colored)

Use the nmbclusters variable and not the NMBCLUSTERS constant when setting
the mclpool hardlimit.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Apr 1 00:23:25 1999 UTC (25 years ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.39: +2 -3 lines
Diff to previous 1.39 (colored) to selected 1.198 (colored)

mbinit() can now allocate memory.  Update a comment accordingly.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Mar 31 01:26:40 1999 UTC (25 years ago) by thorpej
Branch: MAIN
Changes since 1.38: +14 -25 lines
Diff to previous 1.38 (colored) to selected 1.198 (colored)

Set a hard limit (rather than an advisory high water mark for pages) of
NMBCLUSTERS for the mbuf cluster pool.  On platforms which use direct-mapped
segments for pool pages (MIPS and Alpha), this makes NMBCLUSTERS actually
meaningful (such ports don't even allocate mb_map, as it is not used to
map mbuf cluster pages).

Improve the message logged at a maximum rate of once per second.  The
new message: "WARNING: mclpool limit reached; increase NMBCLUSTERS".

In the back-end pool page allocator, remove the message about mb_map
being full.  The message was not necessarily correct as the allocator
may have been starved for pages, rather than for space in the map.  Also,
the hard limit on the mbuf cluster pool will be reached before the map
fills (the last cluster will always fit into the map), so the message
is redundant.

Add a comment in mbinit() about considering setting low water marks on
the mbuf and mbuf cluster pools.

Revision 1.38 / (download) - annotate - [select for diffs], Wed Mar 24 05:51:26 1999 UTC (25 years ago) by mrg
Branch: MAIN
Changes since 1.37: +1 -13 lines
Diff to previous 1.37 (colored) to selected 1.198 (colored)

completely remove Mach VM support.  all that is left is the all the
header files as UVM still uses (most of) these.

Revision 1.37 / (download) - annotate - [select for diffs], Tue Mar 23 02:51:27 1999 UTC (25 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.36: +7 -1 lines
Diff to previous 1.36 (colored) to selected 1.198 (colored)

Set the high water mark on the mbuf cluster pool to NMBCLUSTERS.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Mar 22 22:06:58 1999 UTC (25 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.35: +23 -4 lines
Diff to previous 1.35 (colored) to selected 1.198 (colored)

Put back the code to log `mb_map full' that was lost when mbuf clusters
were converted to use the pool allocator.

Revision 1.35 / (download) - annotate - [select for diffs], Sat Jan 9 22:10:13 1999 UTC (25 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.34: +1 -2 lines
Diff to previous 1.34 (colored) to selected 1.198 (colored)

Garbage-collect `mbutl'.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jan 9 21:54:07 1999 UTC (25 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +1 -2 lines
Diff to previous 1.33 (colored) to selected 1.198 (colored)

Garbage-collect `union mcluster' and `mclfree'.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Dec 18 21:40:14 1998 UTC (25 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +6 -14 lines
Diff to previous 1.32 (colored) to selected 1.198 (colored)

Reverse the stopgap change made in revision 1.29:

date: 1998/08/01 01:47:24;  author: thorpej;  state: Exp;  lines: +18 -8
Don't call the protocol drain routines if how == M_NOWAIT, which typically
means we're in interrupt context.  Since we can be called from a network
hardware interrupt, we could corrupt the protocol queues we try to drain
them at that time.

The problem has been addressed by letting the drain'able protocols use
a locking scheme to prevent queue corruption.

Revision 1.32.4.1 / (download) - annotate - [select for diffs], Fri Dec 11 04:53:03 1998 UTC (25 years, 4 months ago) by kenh
Branch: kenh-if-detach
Changes since 1.32: +2 -1 lines
Diff to previous 1.32 (colored) next main 1.33 (colored) to selected 1.198 (colored)

The beginnings of interface detach support.  Still some bugs, but mostly
works for me.

This work was originally by Bill Studenmund, and cleaned up by me.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Aug 28 20:05:48 1998 UTC (25 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: kenh-if-detach-base, chs-ubc-base, chs-ubc
Branch point for: kenh-if-detach
Changes since 1.31: +5 -3 lines
Diff to previous 1.31 (colored) to selected 1.198 (colored)

Add a waitok boolean argument to the VM system's pool page allocator backend.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Aug 13 19:15:33 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored) to selected 1.198 (colored)

Oops, this got missed in the vm_offset_t -> vaddr_t change.

Revision 1.27.2.1 / (download) - annotate - [select for diffs], Sat Aug 8 03:06:58 1998 UTC (25 years, 8 months ago) by eeh
Branch: eeh-paddr_t
Changes since 1.27: +55 -58 lines
Diff to previous 1.27 (colored) next main 1.28 (colored) to selected 1.198 (colored)

Revert cdevsw mmap routines to return int.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Aug 4 04:03:17 1998 UTC (25 years, 8 months ago) by perry
Branch: MAIN
Changes since 1.29: +11 -11 lines
Diff to previous 1.29 (colored) to selected 1.198 (colored)

Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
  bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)

Revision 1.29 / (download) - annotate - [select for diffs], Sat Aug 1 01:47:24 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.28: +18 -8 lines
Diff to previous 1.28 (colored) to selected 1.198 (colored)

Don't call the protocol drain routines if how == M_NOWAIT, which typically
means we're in interrupt context.  Since we can be called from a network
hardware interrupt, we could corrupt the protocol queues we try to drain
them at that time.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Aug 1 01:35:20 1998 UTC (25 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.27: +37 -50 lines
Diff to previous 1.27 (colored) to selected 1.198 (colored)

Use the pool allocator for mbufs and mbufs clusters (two pools, one for
each).  Partially from pk@netbsd.org.

Revision 1.27 / (download) - annotate - [select for diffs], Fri May 22 17:47:21 1998 UTC (25 years, 11 months ago) by matt
Branch: MAIN
CVS Tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Changes since 1.26: +45 -39 lines
Diff to previous 1.26 (colored) to selected 1.198 (colored)

Add an if_drain to the ifnet structure (call when the system is low
on mbufs).  Add code to m_reclaim to call if_drain in each ifnet
that has one set.  Remove register from declarations.

Revision 1.26 / (download) - annotate - [select for diffs], Sun Mar 1 02:22:33 1998 UTC (26 years, 1 month ago) by fvdl
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored) to selected 1.198 (colored)

Merge with Lite2 + local changes

Revision 1.1.1.3 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:13:04 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-2
Changes since 1.1.1.2: +14 -9 lines
Diff to previous 1.1.1.2 (colored) to selected 1.198 (colored)

Import 4.4BSD-Lite2

Revision 1.1.1.2 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:09:50 1998 UTC (26 years, 1 month ago) by fvdl
Branch: WFJ-920714, CSRG
CVS Tags: lite-1, date-03-may-96
Changes since 1.1.1.1: +169 -29 lines
Diff to previous 1.1.1.1 (colored) to selected 1.198 (colored)

Import 4.4BSD-Lite for reference

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 12 20:39:46 1998 UTC (26 years, 2 months ago) by kleink
Branch: MAIN
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored) to selected 1.198 (colored)

Fix variable declarations:  register -> register int.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Feb 10 14:09:50 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.23: +3 -1 lines
Diff to previous 1.23 (colored) to selected 1.198 (colored)

- add defopt's for UVM, UVMHIST and PMAP_NEW.
- remove unnecessary UVMHIST_DECL's.

Revision 1.23 / (download) - annotate - [select for diffs], Thu Feb 5 07:59:59 1998 UTC (26 years, 2 months ago) by mrg
Branch: MAIN
Changes since 1.22: +10 -1 lines
Diff to previous 1.22 (colored) to selected 1.198 (colored)

initial import of the new virtual memory system, UVM, into -current.

UVM was written by chuck cranor <chuck@maria.wustl.edu>, with some
minor portions derived from the old Mach code.  i provided some help
getting swap and paging working, and other bug fixes/ideas.  chuck
silvers <chuq@chuq.com> also provided some other fixes.

this is the rest of the MI portion changes.

this will be KNF'd shortly.  :-)

Revision 1.21.8.1 / (download) - annotate - [select for diffs], Thu Nov 20 04:29:29 1997 UTC (26 years, 5 months ago) by thorpej
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored) next main 1.22 (colored) to selected 1.198 (colored)

Pull up from trunk: restore m_pkthdr.len in m_split() on error.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Nov 20 04:28:18 1997 UTC (26 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.21: +4 -2 lines
Diff to previous 1.21 (colored) to selected 1.198 (colored)

In m_split(), restore m_pkthdr.len if an error occurs.  From Koji Imada,
PR #3986.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Jun 6 10:51:49 1997 UTC (26 years, 10 months ago) by pk
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, netbsd-1-3-base, marc-pcmcia-bp, marc-pcmcia-base, marc-pcmcia, bouyer-scsipi
Branch point for: netbsd-1-3
Changes since 1.20: +2 -3 lines
Diff to previous 1.20 (colored) to selected 1.198 (colored)

Get `canwait' argument to kmem_malloc() right.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Apr 28 17:03:59 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +2 -1 lines
Diff to previous 1.19 (colored) to selected 1.198 (colored)

Oops; forgot to GC the last mbuf allocated when out of clusters.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Apr 24 08:14:06 1997 UTC (26 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +6 -5 lines
Diff to previous 1.18 (colored) to selected 1.198 (colored)

If we fail to allocate a cluster to hold a large packet, simply
drop it rather than using a chain of tiny mbufs.

Revision 1.18 / (download) - annotate - [select for diffs], Thu Mar 27 20:33:08 1997 UTC (27 years ago) by thorpej
Branch: MAIN
Changes since 1.17: +133 -13 lines
Diff to previous 1.17 (colored) to selected 1.198 (colored)

Update and enhancement to the mbuf code, to support use of non-cluster
external storage.  Highlights:

	- additional "void *" argument to (*ext_free)(), an opaque
	  cookie for use by the free function.
	- MCLALLOC() and MCLFREE() calls are gone.  They are replaced
	  by MEXTADD() (add external storage to mbuf), MEXTMALLOC()
	  (malloc() external storage and attach to mbuf), and
	  MEXTREMOVE() (remove external storage from mbuf).
	- completely new external storage reference counting
	  mechanism; mclrefcnt[] is gone.

These changes will eventually be used to pass driver DMA buffers up
the network stack, and reduce/eliminate copies in certain code paths
(e.g. NFS writes).

From Matt Thomas <matt@3am-software.com> and myself <thorpej@nas.nasa.gov>,
with some input from Chris Demetriou <cgd@cs.cmu.edu> and review by
Charles Hannum <mycroft@mit.edu>.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Dec 18 20:24:50 1996 UTC (27 years, 4 months ago) by gwr
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored) to selected 1.198 (colored)

Move `static' to the beginning of the storage class specifiers.

Revision 1.15.4.1 / (download) - annotate - [select for diffs], Thu Jun 13 17:11:44 1996 UTC (27 years, 10 months ago) by cgd
Branch: netbsd-1-2
CVS Tags: netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA
Changes since 1.15: +12 -6 lines
Diff to previous 1.15 (colored) next main 1.16 (colored) to selected 1.198 (colored)

pull up from trunk:
>if kmem_malloc() fails while trying to allocate an mbuf cluster, try
>and free some space by calling m_reclaim().  Also, log the "mb_map full"
>error message (at most) every 60-seconds.  The old code would log it
>once over the lifetime of the system, but that's not a useful diagnostic.
>(More useful is the new behaviour, which roughly indicates how often
>periods of heavy load occur, without spamming the console and system
>logs with messages.)

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jun 13 17:02:23 1996 UTC (27 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.15: +12 -6 lines
Diff to previous 1.15 (colored) to selected 1.198 (colored)

if kmem_malloc() fails while trying to allocate an mbuf cluster, try
and free some space by calling m_reclaim().  Also, log the "mb_map full"
error message (at most) every 60-seconds.  The old code would log it
once over the lifetime of the system, but that's not a useful diagnostic.
(More useful is the new behaviour, which roughly indicates how often
periods of heavy load occur, without spamming the console and system
logs with messages.)

Revision 1.15 / (download) - annotate - [select for diffs], Fri Feb 9 19:00:45 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base
Branch point for: netbsd-1-2
Changes since 1.14: +1 -3 lines
Diff to previous 1.14 (colored) to selected 1.198 (colored)

More proto fixes

Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 4 02:17:46 1996 UTC (28 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.13: +12 -6 lines
Diff to previous 1.13 (colored) to selected 1.198 (colored)

First pass at prototyping

Revision 1.13 / (download) - annotate - [select for diffs], Sun Oct 30 21:48:06 1994 UTC (29 years, 5 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.12: +7 -3 lines
Diff to previous 1.12 (colored) to selected 1.198 (colored)

be more careful with types, also pull in headers where necessary.

Revision 1.10.2.1 / (download) - annotate - [select for diffs], Thu Oct 6 12:30:21 1994 UTC (29 years, 6 months ago) by mycroft
Branch: netbsd-1-0
CVS Tags: netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.198 (colored)

Update from trunk.

Revision 1.12 / (download) - annotate - [select for diffs], Wed Sep 28 00:44:30 1994 UTC (29 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.11: +2 -7 lines
Diff to previous 1.11 (colored) to selected 1.198 (colored)

don't play with CLBYTES in cpp

Revision 1.11 / (download) - annotate - [select for diffs], Mon Sep 19 08:07:17 1994 UTC (29 years, 7 months ago) by mycroft
Branch: MAIN
Changes since 1.10: +2 -1 lines
Diff to previous 1.10 (colored) to selected 1.198 (colored)

m_adj() returns void.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 29 06:33:34 1994 UTC (29 years, 9 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base
Branch point for: netbsd-1-0
Changes since 1.9: +3 -2 lines
Diff to previous 1.9 (colored) to selected 1.198 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.9 / (download) - annotate - [select for diffs], Fri May 13 06:01:32 1994 UTC (29 years, 11 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +148 -12 lines
Diff to previous 1.8 (colored) to selected 1.198 (colored)

Update to 4.4-Lite networking code, with a few local changes.

Revision 1.8 / (download) - annotate - [select for diffs], Thu Apr 14 21:34:17 1994 UTC (30 years ago) by deraadt
Branch: MAIN
Changes since 1.7: +4 -3 lines
Diff to previous 1.7 (colored) to selected 1.198 (colored)

the packet header is at the start of the mbuf chain, not the end.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jan 8 05:32:20 1994 UTC (30 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +2 -1 lines
Diff to previous 1.6 (colored) to selected 1.198 (colored)

#include vm_kern.h.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Dec 18 04:22:25 1993 UTC (30 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +12 -11 lines
Diff to previous 1.5 (colored) to selected 1.198 (colored)

Canonicalize all #includes.

Revision 1.4.2.3 / (download) - annotate - [select for diffs], Sun Nov 14 21:21:30 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.4.2.2: +12 -12 lines
Diff to previous 1.4.2.2 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored) to selected 1.198 (colored)

Canonicalize all #includes.

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Tue Oct 26 12:54:57 1993 UTC (30 years, 5 months ago) by mycroft
Branch: magnum
Changes since 1.4.2.1: +15 -16 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) to selected 1.198 (colored)

Merge changes from trunk.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Oct 22 02:48:35 1993 UTC (30 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.4: +15 -16 lines
Diff to previous 1.4 (colored) to selected 1.198 (colored)

slightly clean up ws's original patch to this file for the sense
of wait vs. nowait.  this patch from torek.

Revision 1.4.2.1 / (download) - annotate - [select for diffs], Fri Sep 24 08:51:51 1993 UTC (30 years, 6 months ago) by mycroft
Branch: magnum
Changes since 1.4: +4 -1 lines
Diff to previous 1.4 (colored) to selected 1.198 (colored)

Make all files using spl*() #include cpu.h.  Changes from trunk.
init_main.c: New method of pseudo-device of initialization.
kern_clock.c: hardclock() and softclock() now take a pointer to a clockframe.
softclock() only does callouts.
kern_synch.c: Remove spurious declaration of endtsleep().  Adjust uses of
averunnable for new struct loadav.
subr_prf.c: Allow printf() formats in panic().
tty.c: averunnable changes.
vfs_subr.c: va_size and va_bytes are now quads.

Revision 1.4 / (download) - annotate - [select for diffs], Sat Sep 4 00:01:43 1993 UTC (30 years, 7 months ago) by jtc
Branch: MAIN
CVS Tags: magnum-base
Branch point for: magnum
Changes since 1.3: +3 -1 lines
Diff to previous 1.3 (colored) to selected 1.198 (colored)

Include systm.h to get prototypes (and possibly inlines) of *max functions.
Change mbinit() to match prototype.

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 20 02:55:24 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-0-9-patch-001, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9
Changes since 1.2: +2 -8 lines
Diff to previous 1.2 (colored) to selected 1.198 (colored)

add $Id$ strings, and clean up file headers where necessary

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-8
Changes since 1.1: +19 -11 lines
Diff to previous 1.1 (colored) to selected 1.198 (colored)

after 0.2.2 "stable" patches applied

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: WFJ-920714, CSRG
CVS Tags: WFJ-386bsd-01
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored) to selected 1.198 (colored)

initial import of 386bsd-0.1 sources

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years, 1 month ago) by cgd
Branch: MAIN
Diff to selected 1.198 (colored)

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>