Thu Nov 15 10:06:07 2018 UTC ()
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().


(maxv)
diff -r1.2237 -r1.2238 src/distrib/sets/lists/comp/mi
diff -r1.431 -r1.432 src/share/man/man9/Makefile
diff -r1.6 -r1.7 src/share/man/man9/m_tag.9
diff -r1.221 -r1.222 src/sys/kern/uipc_mbuf.c
diff -r1.105 -r1.106 src/sys/net/if_loop.c
diff -r1.4 -r1.5 src/sys/netcan/can.c
diff -r1.174 -r1.175 src/sys/netinet/ip_icmp.c
diff -r1.211 -r1.212 src/sys/sys/mbuf.h

cvs diff -r1.2237 -r1.2238 src/distrib/sets/lists/comp/mi (expand / switch to unified diff)

--- src/distrib/sets/lists/comp/mi 2018/10/28 00:44:37 1.2237
+++ src/distrib/sets/lists/comp/mi 2018/11/15 10:06:06 1.2238
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: mi,v 1.2237 2018/10/28 00:44:37 uwe Exp $ 1# $NetBSD: mi,v 1.2238 2018/11/15 10:06:06 maxv Exp $
2# 2#
3# Note: don't delete entries from here - mark them as "obsolete" instead. 3# Note: don't delete entries from here - mark them as "obsolete" instead.
4./etc/mtree/set.comp comp-sys-root 4./etc/mtree/set.comp comp-sys-root
5./usr/bin/addr2line comp-debug-bin binutils 5./usr/bin/addr2line comp-debug-bin binutils
6./usr/bin/ar comp-util-bin binutils 6./usr/bin/ar comp-util-bin binutils
7./usr/bin/as comp-util-bin binutils 7./usr/bin/as comp-util-bin binutils
8./usr/bin/asa comp-fortran-bin 8./usr/bin/asa comp-fortran-bin
9./usr/bin/atf-compile comp-obsolete obsolete 9./usr/bin/atf-compile comp-obsolete obsolete
10./usr/bin/c++ comp-cxx-bin gcccmds 10./usr/bin/c++ comp-cxx-bin gcccmds
11./usr/bin/c++filt comp-cxx-bin binutils 11./usr/bin/c++filt comp-cxx-bin binutils
12./usr/bin/c11 comp-c-bin 12./usr/bin/c11 comp-c-bin
13./usr/bin/c89 comp-c-bin 13./usr/bin/c89 comp-c-bin
14./usr/bin/c99 comp-c-bin 14./usr/bin/c99 comp-c-bin
@@ -11225,33 +11225,33 @@ @@ -11225,33 +11225,33 @@
11225./usr/share/man/cat9/m_get.0 comp-sys-catman .cat 11225./usr/share/man/cat9/m_get.0 comp-sys-catman .cat
11226./usr/share/man/cat9/m_getclr.0 comp-obsolete obsolete 11226./usr/share/man/cat9/m_getclr.0 comp-obsolete obsolete
11227./usr/share/man/cat9/m_gethdr.0 comp-sys-catman .cat 11227./usr/share/man/cat9/m_gethdr.0 comp-sys-catman .cat
11228./usr/share/man/cat9/m_makewritable.0 comp-sys-catman .cat 11228./usr/share/man/cat9/m_makewritable.0 comp-sys-catman .cat
11229./usr/share/man/cat9/m_prepend.0 comp-sys-catman .cat 11229./usr/share/man/cat9/m_prepend.0 comp-sys-catman .cat
11230./usr/share/man/cat9/m_pulldown.0 comp-sys-catman .cat 11230./usr/share/man/cat9/m_pulldown.0 comp-sys-catman .cat
11231./usr/share/man/cat9/m_pullup.0 comp-sys-catman .cat 11231./usr/share/man/cat9/m_pullup.0 comp-sys-catman .cat
11232./usr/share/man/cat9/m_split.0 comp-sys-catman .cat 11232./usr/share/man/cat9/m_split.0 comp-sys-catman .cat
11233./usr/share/man/cat9/m_tag.0 comp-sys-catman .cat 11233./usr/share/man/cat9/m_tag.0 comp-sys-catman .cat
11234./usr/share/man/cat9/m_tag_copy.0 comp-sys-catman .cat 11234./usr/share/man/cat9/m_tag_copy.0 comp-sys-catman .cat
11235./usr/share/man/cat9/m_tag_copy_chain.0 comp-sys-catman .cat 11235./usr/share/man/cat9/m_tag_copy_chain.0 comp-sys-catman .cat
11236./usr/share/man/cat9/m_tag_delete.0 comp-sys-catman .cat 11236./usr/share/man/cat9/m_tag_delete.0 comp-sys-catman .cat
11237./usr/share/man/cat9/m_tag_delete_chain.0 comp-sys-catman .cat 11237./usr/share/man/cat9/m_tag_delete_chain.0 comp-sys-catman .cat
11238./usr/share/man/cat9/m_tag_delete_nonpersistent.0 comp-sys-catman .cat 11238./usr/share/man/cat9/m_tag_delete_nonpersistent.0 comp-obsolete obsolete
11239./usr/share/man/cat9/m_tag_find.0 comp-sys-catman .cat 11239./usr/share/man/cat9/m_tag_find.0 comp-sys-catman .cat
11240./usr/share/man/cat9/m_tag_first.0 comp-sys-catman .cat 11240./usr/share/man/cat9/m_tag_first.0 comp-obsolete obsolete
11241./usr/share/man/cat9/m_tag_free.0 comp-sys-catman .cat 11241./usr/share/man/cat9/m_tag_free.0 comp-sys-catman .cat
11242./usr/share/man/cat9/m_tag_get.0 comp-sys-catman .cat 11242./usr/share/man/cat9/m_tag_get.0 comp-sys-catman .cat
11243./usr/share/man/cat9/m_tag_init.0 comp-sys-catman .cat 11243./usr/share/man/cat9/m_tag_init.0 comp-obsolete obsolete
11244./usr/share/man/cat9/m_tag_next.0 comp-sys-catman .cat 11244./usr/share/man/cat9/m_tag_next.0 comp-obsolete obsolete
11245./usr/share/man/cat9/m_tag_prepend.0 comp-sys-catman .cat 11245./usr/share/man/cat9/m_tag_prepend.0 comp-sys-catman .cat
11246./usr/share/man/cat9/m_tag_unlink.0 comp-sys-catman .cat 11246./usr/share/man/cat9/m_tag_unlink.0 comp-sys-catman .cat
11247./usr/share/man/cat9/makeiplcookie.0 comp-sys-catman .cat 11247./usr/share/man/cat9/makeiplcookie.0 comp-sys-catman .cat
11248./usr/share/man/cat9/malloc.0 comp-sys-catman .cat 11248./usr/share/man/cat9/malloc.0 comp-sys-catman .cat
11249./usr/share/man/cat9/malloc_roundup.0 comp-obsolete obsolete 11249./usr/share/man/cat9/malloc_roundup.0 comp-obsolete obsolete
11250./usr/share/man/cat9/malloc_type_attach.0 comp-sys-catman .cat 11250./usr/share/man/cat9/malloc_type_attach.0 comp-sys-catman .cat
11251./usr/share/man/cat9/malloc_type_detach.0 comp-sys-catman .cat 11251./usr/share/man/cat9/malloc_type_detach.0 comp-sys-catman .cat
11252./usr/share/man/cat9/malloc_type_setlimit.0 comp-obsolete obsolete 11252./usr/share/man/cat9/malloc_type_setlimit.0 comp-obsolete obsolete
11253./usr/share/man/cat9/mb.0 comp-sys-catman .cat 11253./usr/share/man/cat9/mb.0 comp-sys-catman .cat
11254./usr/share/man/cat9/mb_memory.0 comp-sys-catman .cat 11254./usr/share/man/cat9/mb_memory.0 comp-sys-catman .cat
11255./usr/share/man/cat9/mb_read.0 comp-sys-catman .cat 11255./usr/share/man/cat9/mb_read.0 comp-sys-catman .cat
11256./usr/share/man/cat9/mb_write.0 comp-sys-catman .cat 11256./usr/share/man/cat9/mb_write.0 comp-sys-catman .cat
11257./usr/share/man/cat9/mbuf.0 comp-sys-catman .cat 11257./usr/share/man/cat9/mbuf.0 comp-sys-catman .cat
@@ -19038,33 +19038,33 @@ @@ -19038,33 +19038,33 @@
19038./usr/share/man/html9/m_get.html comp-sys-htmlman html 19038./usr/share/man/html9/m_get.html comp-sys-htmlman html
19039./usr/share/man/html9/m_getclr.html comp-obsolete obsolete 19039./usr/share/man/html9/m_getclr.html comp-obsolete obsolete
19040./usr/share/man/html9/m_gethdr.html comp-sys-htmlman html 19040./usr/share/man/html9/m_gethdr.html comp-sys-htmlman html
19041./usr/share/man/html9/m_makewritable.html comp-sys-htmlman html 19041./usr/share/man/html9/m_makewritable.html comp-sys-htmlman html
19042./usr/share/man/html9/m_prepend.html comp-sys-htmlman html 19042./usr/share/man/html9/m_prepend.html comp-sys-htmlman html
19043./usr/share/man/html9/m_pulldown.html comp-sys-htmlman html 19043./usr/share/man/html9/m_pulldown.html comp-sys-htmlman html
19044./usr/share/man/html9/m_pullup.html comp-sys-htmlman html 19044./usr/share/man/html9/m_pullup.html comp-sys-htmlman html
19045./usr/share/man/html9/m_split.html comp-sys-htmlman html 19045./usr/share/man/html9/m_split.html comp-sys-htmlman html
19046./usr/share/man/html9/m_tag.html comp-sys-htmlman html 19046./usr/share/man/html9/m_tag.html comp-sys-htmlman html
19047./usr/share/man/html9/m_tag_copy.html comp-sys-htmlman html 19047./usr/share/man/html9/m_tag_copy.html comp-sys-htmlman html
19048./usr/share/man/html9/m_tag_copy_chain.html comp-sys-htmlman html 19048./usr/share/man/html9/m_tag_copy_chain.html comp-sys-htmlman html
19049./usr/share/man/html9/m_tag_delete.html comp-sys-htmlman html 19049./usr/share/man/html9/m_tag_delete.html comp-sys-htmlman html
19050./usr/share/man/html9/m_tag_delete_chain.html comp-sys-htmlman html 19050./usr/share/man/html9/m_tag_delete_chain.html comp-sys-htmlman html
19051./usr/share/man/html9/m_tag_delete_nonpersistent.html comp-sys-htmlman html 19051./usr/share/man/html9/m_tag_delete_nonpersistent.html comp-obsolete obsolete
19052./usr/share/man/html9/m_tag_find.html comp-sys-htmlman html 19052./usr/share/man/html9/m_tag_find.html comp-sys-htmlman html
19053./usr/share/man/html9/m_tag_first.html comp-sys-htmlman html 19053./usr/share/man/html9/m_tag_first.html comp-obsolete obsolete
19054./usr/share/man/html9/m_tag_free.html comp-sys-htmlman html 19054./usr/share/man/html9/m_tag_free.html comp-sys-htmlman html
19055./usr/share/man/html9/m_tag_get.html comp-sys-htmlman html 19055./usr/share/man/html9/m_tag_get.html comp-sys-htmlman html
19056./usr/share/man/html9/m_tag_init.html comp-sys-htmlman html 19056./usr/share/man/html9/m_tag_init.html comp-obsolete obsolete
19057./usr/share/man/html9/m_tag_next.html comp-sys-htmlman html 19057./usr/share/man/html9/m_tag_next.html comp-obsolete obsolete
19058./usr/share/man/html9/m_tag_prepend.html comp-sys-htmlman html 19058./usr/share/man/html9/m_tag_prepend.html comp-sys-htmlman html
19059./usr/share/man/html9/m_tag_unlink.html comp-sys-htmlman html 19059./usr/share/man/html9/m_tag_unlink.html comp-sys-htmlman html
19060./usr/share/man/html9/makeiplcookie.html comp-sys-htmlman html 19060./usr/share/man/html9/makeiplcookie.html comp-sys-htmlman html
19061./usr/share/man/html9/malloc.html comp-sys-htmlman html 19061./usr/share/man/html9/malloc.html comp-sys-htmlman html
19062./usr/share/man/html9/malloc_roundup.html comp-obsolete obsolete 19062./usr/share/man/html9/malloc_roundup.html comp-obsolete obsolete
19063./usr/share/man/html9/malloc_type_attach.html comp-sys-htmlman html 19063./usr/share/man/html9/malloc_type_attach.html comp-sys-htmlman html
19064./usr/share/man/html9/malloc_type_detach.html comp-sys-htmlman html 19064./usr/share/man/html9/malloc_type_detach.html comp-sys-htmlman html
19065./usr/share/man/html9/malloc_type_setlimit.html comp-obsolete obsolete 19065./usr/share/man/html9/malloc_type_setlimit.html comp-obsolete obsolete
19066./usr/share/man/html9/mb.html comp-sys-htmlman html 19066./usr/share/man/html9/mb.html comp-sys-htmlman html
19067./usr/share/man/html9/mb_memory.html comp-sys-htmlman html 19067./usr/share/man/html9/mb_memory.html comp-sys-htmlman html
19068./usr/share/man/html9/mb_read.html comp-sys-htmlman html 19068./usr/share/man/html9/mb_read.html comp-sys-htmlman html
19069./usr/share/man/html9/mb_write.html comp-sys-htmlman html 19069./usr/share/man/html9/mb_write.html comp-sys-htmlman html
19070./usr/share/man/html9/mbuf.html comp-sys-htmlman html 19070./usr/share/man/html9/mbuf.html comp-sys-htmlman html
@@ -27005,33 +27005,33 @@ @@ -27005,33 +27005,33 @@
27005./usr/share/man/man9/m_get.9 comp-sys-man .man 27005./usr/share/man/man9/m_get.9 comp-sys-man .man
27006./usr/share/man/man9/m_getclr.9 comp-obsolete obsolete 27006./usr/share/man/man9/m_getclr.9 comp-obsolete obsolete
27007./usr/share/man/man9/m_gethdr.9 comp-sys-man .man 27007./usr/share/man/man9/m_gethdr.9 comp-sys-man .man
27008./usr/share/man/man9/m_makewritable.9 comp-sys-man .man 27008./usr/share/man/man9/m_makewritable.9 comp-sys-man .man
27009./usr/share/man/man9/m_prepend.9 comp-sys-man .man 27009./usr/share/man/man9/m_prepend.9 comp-sys-man .man
27010./usr/share/man/man9/m_pulldown.9 comp-sys-man .man 27010./usr/share/man/man9/m_pulldown.9 comp-sys-man .man
27011./usr/share/man/man9/m_pullup.9 comp-sys-man .man 27011./usr/share/man/man9/m_pullup.9 comp-sys-man .man
27012./usr/share/man/man9/m_split.9 comp-sys-man .man 27012./usr/share/man/man9/m_split.9 comp-sys-man .man
27013./usr/share/man/man9/m_tag.9 comp-sys-man .man 27013./usr/share/man/man9/m_tag.9 comp-sys-man .man
27014./usr/share/man/man9/m_tag_copy.9 comp-sys-man .man 27014./usr/share/man/man9/m_tag_copy.9 comp-sys-man .man
27015./usr/share/man/man9/m_tag_copy_chain.9 comp-sys-man .man 27015./usr/share/man/man9/m_tag_copy_chain.9 comp-sys-man .man
27016./usr/share/man/man9/m_tag_delete.9 comp-sys-man .man 27016./usr/share/man/man9/m_tag_delete.9 comp-sys-man .man
27017./usr/share/man/man9/m_tag_delete_chain.9 comp-sys-man .man 27017./usr/share/man/man9/m_tag_delete_chain.9 comp-sys-man .man
27018./usr/share/man/man9/m_tag_delete_nonpersistent.9 comp-sys-man .man 27018./usr/share/man/man9/m_tag_delete_nonpersistent.9 comp-obsolete obsolete
27019./usr/share/man/man9/m_tag_find.9 comp-sys-man .man 27019./usr/share/man/man9/m_tag_find.9 comp-sys-man .man
27020./usr/share/man/man9/m_tag_first.9 comp-sys-man .man 27020./usr/share/man/man9/m_tag_first.9 comp-obsolete obsolete
27021./usr/share/man/man9/m_tag_free.9 comp-sys-man .man 27021./usr/share/man/man9/m_tag_free.9 comp-sys-man .man
27022./usr/share/man/man9/m_tag_get.9 comp-sys-man .man 27022./usr/share/man/man9/m_tag_get.9 comp-sys-man .man
27023./usr/share/man/man9/m_tag_init.9 comp-sys-man .man 27023./usr/share/man/man9/m_tag_init.9 comp-obsolete obsolete
27024./usr/share/man/man9/m_tag_next.9 comp-sys-man .man 27024./usr/share/man/man9/m_tag_next.9 comp-obsolete obsolete
27025./usr/share/man/man9/m_tag_prepend.9 comp-sys-man .man 27025./usr/share/man/man9/m_tag_prepend.9 comp-sys-man .man
27026./usr/share/man/man9/m_tag_unlink.9 comp-sys-man .man 27026./usr/share/man/man9/m_tag_unlink.9 comp-sys-man .man
27027./usr/share/man/man9/makeiplcookie.9 comp-sys-man .man 27027./usr/share/man/man9/makeiplcookie.9 comp-sys-man .man
27028./usr/share/man/man9/malloc.9 comp-sys-man .man 27028./usr/share/man/man9/malloc.9 comp-sys-man .man
27029./usr/share/man/man9/malloc_roundup.9 comp-obsolete obsolete 27029./usr/share/man/man9/malloc_roundup.9 comp-obsolete obsolete
27030./usr/share/man/man9/malloc_type_attach.9 comp-sys-man .man 27030./usr/share/man/man9/malloc_type_attach.9 comp-sys-man .man
27031./usr/share/man/man9/malloc_type_detach.9 comp-sys-man .man 27031./usr/share/man/man9/malloc_type_detach.9 comp-sys-man .man
27032./usr/share/man/man9/malloc_type_setlimit.9 comp-obsolete obsolete 27032./usr/share/man/man9/malloc_type_setlimit.9 comp-obsolete obsolete
27033./usr/share/man/man9/mb.9 comp-sys-man .man 27033./usr/share/man/man9/mb.9 comp-sys-man .man
27034./usr/share/man/man9/mb_memory.9 comp-sys-man .man 27034./usr/share/man/man9/mb_memory.9 comp-sys-man .man
27035./usr/share/man/man9/mb_read.9 comp-sys-man .man 27035./usr/share/man/man9/mb_read.9 comp-sys-man .man
27036./usr/share/man/man9/mb_write.9 comp-sys-man .man 27036./usr/share/man/man9/mb_write.9 comp-sys-man .man
27037./usr/share/man/man9/mbuf.9 comp-sys-man .man 27037./usr/share/man/man9/mbuf.9 comp-sys-man .man

cvs diff -r1.431 -r1.432 src/share/man/man9/Makefile (expand / switch to unified diff)

--- src/share/man/man9/Makefile 2018/10/05 09:51:55 1.431
+++ src/share/man/man9/Makefile 2018/11/15 10:06:06 1.432
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.431 2018/10/05 09:51:55 hannken Exp $ 1# $NetBSD: Makefile,v 1.432 2018/11/15 10:06:06 maxv Exp $
2 2
3# Makefile for section 9 (kernel function and variable) manual pages. 3# Makefile for section 9 (kernel function and variable) manual pages.
4 4
5MAN= accept_filter.9 accf_data.9 accf_http.9 \ 5MAN= accept_filter.9 accf_data.9 accf_http.9 \
6 altq.9 arp.9 audio.9 audio_system.9 autoconf.9 \ 6 altq.9 arp.9 audio.9 audio_system.9 autoconf.9 \
7 bcdtobin.9 bcmp.9 bcopy.9 bintime_add.9 bluetooth.9 boothowto.9 bpf.9 \ 7 bcdtobin.9 bcmp.9 bcopy.9 bintime_add.9 bluetooth.9 boothowto.9 bpf.9 \
8 buffercache.9 bufferio.9 bufq.9 bus_dma.9 bus_space.9 byteorder.9 \ 8 buffercache.9 bufferio.9 bufq.9 bus_dma.9 bus_space.9 byteorder.9 \
9 bzero.9 \ 9 bzero.9 \
10 callback.9 callout.9 cardbus.9 clock.9 cnmagic.9 condvar.9 config.9 \ 10 callback.9 callout.9 cardbus.9 clock.9 cnmagic.9 condvar.9 config.9 \
11 cons.9 copy.9 coredump_write.9 \ 11 cons.9 copy.9 coredump_write.9 \
12 cpu_configure.9 cpu_coredump.9 cpu_dumpconf.9 \ 12 cpu_configure.9 cpu_coredump.9 cpu_dumpconf.9 \
13 cpu_lwp_fork.9 \ 13 cpu_lwp_fork.9 \
14 cpu_idle.9 cpu_initclocks.9 cpu_need_resched.9 \ 14 cpu_idle.9 cpu_initclocks.9 cpu_need_resched.9 \
@@ -536,33 +536,29 @@ MLINKS+=module.9 module_autoload.9 \ @@ -536,33 +536,29 @@ MLINKS+=module.9 module_autoload.9 \
536 module.9 module_start_unload_thread.9 \ 536 module.9 module_start_unload_thread.9 \
537 module.9 module_unload.9 \ 537 module.9 module_unload.9 \
538 module.9 module_register_callbacks.9 \ 538 module.9 module_register_callbacks.9 \
539 module.9 module_unregister_callbacks.9 539 module.9 module_unregister_callbacks.9
540MLINKS+=mstohz.9 hztoms.9 540MLINKS+=mstohz.9 hztoms.9
541MLINKS+=mutex.9 mutex_init.9 mutex.9 mutex_destroy.9 mutex.9 mutex_enter.9 \ 541MLINKS+=mutex.9 mutex_init.9 mutex.9 mutex_destroy.9 mutex.9 mutex_enter.9 \
542 mutex.9 mutex_exit.9 mutex.9 mutex_tryenter.9 mutex.9 mutex_owned.9 \ 542 mutex.9 mutex_exit.9 mutex.9 mutex_tryenter.9 mutex.9 mutex_owned.9 \
543 mutex.9 mutex_ownable.9 \ 543 mutex.9 mutex_ownable.9 \
544 mutex.9 mutex_spin_enter.9 mutex.9 mutex_spin_exit.9 544 mutex.9 mutex_spin_enter.9 mutex.9 mutex_spin_exit.9
545MLINKS+=m_tag.9 m_tag_copy.9 \ 545MLINKS+=m_tag.9 m_tag_copy.9 \
546 m_tag.9 m_tag_copy_chain.9 \ 546 m_tag.9 m_tag_copy_chain.9 \
547 m_tag.9 m_tag_delete.9 \ 547 m_tag.9 m_tag_delete.9 \
548 m_tag.9 m_tag_delete_chain.9 \ 548 m_tag.9 m_tag_delete_chain.9 \
549 m_tag.9 m_tag_delete_nonpersistent.9 \ 
550 m_tag.9 m_tag_find.9 \ 549 m_tag.9 m_tag_find.9 \
551 m_tag.9 m_tag_first.9 \ 
552 m_tag.9 m_tag_free.9 \ 550 m_tag.9 m_tag_free.9 \
553 m_tag.9 m_tag_get.9 \ 551 m_tag.9 m_tag_get.9 \
554 m_tag.9 m_tag_init.9 \ 
555 m_tag.9 m_tag_next.9 \ 
556 m_tag.9 m_tag_prepend.9 \ 552 m_tag.9 m_tag_prepend.9 \
557 m_tag.9 m_tag_unlink.9 553 m_tag.9 m_tag_unlink.9
558MLINKS+=namecache.9 cache_lookup.9 \ 554MLINKS+=namecache.9 cache_lookup.9 \
559 namecache.9 cache_revlookup.9 \ 555 namecache.9 cache_revlookup.9 \
560 namecache.9 cache_enter.9 \ 556 namecache.9 cache_enter.9 \
561 namecache.9 cache_purge.9 \ 557 namecache.9 cache_purge.9 \
562 namecache.9 cache_purgevfs.9 \ 558 namecache.9 cache_purgevfs.9 \
563 namecache.9 namecache_print.9 559 namecache.9 namecache_print.9
564MLINKS+=namei.9 lookup.9 \ 560MLINKS+=namei.9 lookup.9 \
565 namei.9 relookup.9 \ 561 namei.9 relookup.9 \
566 namei.9 NDINIT.9 562 namei.9 NDINIT.9
567MLINKS+=nullop.9 voidop.9 \ 563MLINKS+=nullop.9 voidop.9 \
568 nullop.9 enodev.9 \ 564 nullop.9 enodev.9 \

cvs diff -r1.6 -r1.7 src/share/man/man9/m_tag.9 (expand / switch to unified diff)

--- src/share/man/man9/m_tag.9 2018/11/15 09:38:57 1.6
+++ src/share/man/man9/m_tag.9 2018/11/15 10:06:06 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1.\" $NetBSD: m_tag.9,v 1.6 2018/11/15 09:38:57 maxv Exp $ 1.\" $NetBSD: m_tag.9,v 1.7 2018/11/15 10:06:06 maxv Exp $
2.\" 2.\"
3.\" Copyright (c)2004 YAMAMOTO Takashi, 3.\" Copyright (c)2004 YAMAMOTO Takashi,
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
@@ -26,63 +26,51 @@ @@ -26,63 +26,51 @@
26.\" 26.\"
27.\" ------------------------------------------------------------ 27.\" ------------------------------------------------------------
28.Dd November 15, 2018 28.Dd November 15, 2018
29.Dt M_TAG 9 29.Dt M_TAG 9
30.Os 30.Os
31.Sh NAME 31.Sh NAME
32.Nm m_tag , 32.Nm m_tag ,
33.Nm m_tag_get , 33.Nm m_tag_get ,
34.Nm m_tag_free , 34.Nm m_tag_free ,
35.Nm m_tag_prepend , 35.Nm m_tag_prepend ,
36.Nm m_tag_unlink , 36.Nm m_tag_unlink ,
37.Nm m_tag_delete , 37.Nm m_tag_delete ,
38.Nm m_tag_delete_chain , 38.Nm m_tag_delete_chain ,
39.Nm m_tag_delete_nonpersistent , 
40.Nm m_tag_find , 39.Nm m_tag_find ,
41.Nm m_tag_copy , 40.Nm m_tag_copy ,
42.Nm m_tag_copy_chain , 41.Nm m_tag_copy_chain
43.Nm m_tag_init , 
44.Nm m_tag_first , 
45.Nm m_tag_next 
46.Nd mbuf tagging interfaces 42.Nd mbuf tagging interfaces
47.\" ------------------------------------------------------------ 43.\" ------------------------------------------------------------
48.Sh SYNOPSIS 44.Sh SYNOPSIS
49.In sys/mbuf.h 45.In sys/mbuf.h
50.Ft struct m_tag * 46.Ft struct m_tag *
51.Fn m_tag_get "int type" "int len" "int wait" 47.Fn m_tag_get "int type" "int len" "int wait"
52.Ft void 48.Ft void
53.Fn m_tag_free "struct m_tag *t" 49.Fn m_tag_free "struct m_tag *t"
54.Ft void 50.Ft void
55.Fn m_tag_prepend "struct mbuf *m" "struct m_tag *t" 51.Fn m_tag_prepend "struct mbuf *m" "struct m_tag *t"
56.Ft void 52.Ft void
57.Fn m_tag_unlink "struct mbuf *m" "struct m_tag *t" 53.Fn m_tag_unlink "struct mbuf *m" "struct m_tag *t"
58.Ft void 54.Ft void
59.Fn m_tag_delete "struct mbuf *m" "struct m_tag *t" 55.Fn m_tag_delete "struct mbuf *m" "struct m_tag *t"
60.Ft void 56.Ft void
61.Fn m_tag_delete_chain "struct mbuf *m" "struct m_tag *t" 57.Fn m_tag_delete_chain "struct mbuf *m"
62.Ft void 
63.Fn m_tag_delete_nonpersistent "struct mbuf *" 
64.Ft struct m_tag * 58.Ft struct m_tag *
65.Fn m_tag_find "struct mbuf *m" "int type" "struct m_tag *t" 59.Fn m_tag_find "struct mbuf *m" "int type" "struct m_tag *t"
66.Ft struct m_tag * 60.Ft struct m_tag *
67.Fn m_tag_copy "struct m_tag *m" 61.Fn m_tag_copy "struct m_tag *m"
68.Ft int 62.Ft int
69.Fn m_tag_copy_chain "struct mbuf *to" "struct mbuf *from" 63.Fn m_tag_copy_chain "struct mbuf *to" "struct mbuf *from"
70.Ft void 
71.Fn m_tag_init "struct mbuf *m" 
72.Ft struct m_tag * 
73.Fn m_tag_first "struct mbuf *m" 
74.Ft struct m_tag * 
75.Fn m_tag_next "struct mbuf *m" "struct m_tag *t" 
76.\" ------------------------------------------------------------ 64.\" ------------------------------------------------------------
77.Sh DESCRIPTION 65.Sh DESCRIPTION
78The 66The
79.Nm 67.Nm
80interface is used to 68interface is used to
81.Dq tag 69.Dq tag
82mbufs. 70mbufs.
83.\" XXX PACKET_TAG_* 71.\" XXX PACKET_TAG_*
84.\" ------------------------------------------------------------ 72.\" ------------------------------------------------------------
85.Sh FUNCTIONS 73.Sh FUNCTIONS
86.Bl -tag -width compact 74.Bl -tag -width compact
87.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 75.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
88.It Fn m_tag_get "type" "len" "wait" 76.It Fn m_tag_get "type" "len" "wait"
@@ -119,41 +107,28 @@ will also be freed. @@ -119,41 +107,28 @@ will also be freed.
119.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 107.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
120.It Fn m_tag_unlink "m" "t" 108.It Fn m_tag_unlink "m" "t"
121Unlink the mbuf tag 109Unlink the mbuf tag
122.Fa t 110.Fa t
123from the mbuf 111from the mbuf
124.Fa m . 112.Fa m .
125.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 113.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
126.It Fn m_tag_delete "m" "t" 114.It Fn m_tag_delete "m" "t"
127The same as 115The same as
128.Fn m_tag_unlink 116.Fn m_tag_unlink
129followed by 117followed by
130.Fn m_tag_free . 118.Fn m_tag_free .
131.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 119.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
132.It Fn m_tag_delete_chain "m" "t" 120.It Fn m_tag_delete_chain "m"
133Unlink and free mbuf tags beginning with the mbuf tag 121Unlink and free mbuf tags from the mbuf
134.Fa t 
135from the mbuf 
136.Fa m . 
137If 
138.Fa t 
139is 
140.Dv NULL , 
141.Fn m_tag_delete_chain 
142unlinks and frees all mbuf tags associated with the mbuf 
143.Fa m . 
144.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
145.It Fn m_tag_delete_nonpersistent "m" 
146Unlink and free all non persistent tags associated with the mbuf 
147.Fa m . 122.Fa m .
148.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 123.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
149.It Fn m_tag_find "m" "type" "t" 124.It Fn m_tag_find "m" "type" "t"
150Find an mbuf tag with type 125Find an mbuf tag with type
151.Fa type 126.Fa type
152after the mbuf tag 127after the mbuf tag
153.Fa t 128.Fa t
154in the tag chain associated with the mbuf 129in the tag chain associated with the mbuf
155.Fa m . 130.Fa m .
156If 131If
157.Fa t 132.Fa t
158is 133is
159.Dv NULL , 134.Dv NULL ,
@@ -170,48 +145,26 @@ Otherwise return @@ -170,48 +145,26 @@ Otherwise return
170.Dv NULL . 145.Dv NULL .
171.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 146.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
172.It Fn m_tag_copy_chain "to" "from" 147.It Fn m_tag_copy_chain "to" "from"
173Copy all mbuf tags associated with the mbuf 148Copy all mbuf tags associated with the mbuf
174.Fa from 149.Fa from
175to the mbuf 150to the mbuf
176.Fa to . 151.Fa to .
177If 152If
178.Fa to 153.Fa to
179already has any mbuf tags, they will be unlinked and freed beforehand. 154already has any mbuf tags, they will be unlinked and freed beforehand.
180Return 1 on success. 155Return 1 on success.
181Otherwise return 0. 156Otherwise return 0.
182.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 157.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
183.It Fn m_tag_init "m" 
184Initialize mbuf tag chain of the mbuf 
185.Fa m . 
186.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
187.It Fn m_tag_first "m" 
188Return the first mbuf tag associated with the mbuf 
189.Fa m . 
190Return 
191.Dv NULL 
192if no mbuf tags are found. 
193.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
194.It Fn m_tag_next "m" "t" 
195Return the next mbuf tag after 
196.Fa t 
197associated with the mbuf 
198.Fa m . 
199Return 
200.Dv NULL 
201if 
202.Fa t 
203is the last tag in the chain. 
204.\" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
205.El 158.El
206.\" ------------------------------------------------------------ 159.\" ------------------------------------------------------------
207.Sh CODE REFERENCES 160.Sh CODE REFERENCES
208The mbuf tagging interfaces are implemented within the file 161The mbuf tagging interfaces are implemented within the file
209.Pa sys/kern/uipc_mbuf.c . 162.Pa sys/kern/uipc_mbuf.c .
210.Pp 163.Pp
211The 164The
212.Dv PACKET_TAG_ 165.Dv PACKET_TAG_
213macros are defined in the file 166macros are defined in the file
214.Pa sys/sys/mbuf.h . 167.Pa sys/sys/mbuf.h .
215.Sh SEE ALSO 168.Sh SEE ALSO
216.Xr intro 9 , 169.Xr intro 9 ,
217.Xr malloc 9 , 170.Xr malloc 9 ,

cvs diff -r1.221 -r1.222 src/sys/kern/uipc_mbuf.c (expand / switch to unified diff)

--- src/sys/kern/uipc_mbuf.c 2018/11/15 09:38:57 1.221
+++ src/sys/kern/uipc_mbuf.c 2018/11/15 10:06:07 1.222
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: uipc_mbuf.c,v 1.221 2018/11/15 09:38:57 maxv Exp $ */ 1/* $NetBSD: uipc_mbuf.c,v 1.222 2018/11/15 10:06:07 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center. 9 * NASA Ames Research Center.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -52,27 +52,27 @@ @@ -52,27 +52,27 @@
52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 52 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 53 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 54 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 55 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 56 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 57 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 58 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * SUCH DAMAGE. 59 * SUCH DAMAGE.
60 * 60 *
61 * @(#)uipc_mbuf.c 8.4 (Berkeley) 2/14/95 61 * @(#)uipc_mbuf.c 8.4 (Berkeley) 2/14/95
62 */ 62 */
63 63
64#include <sys/cdefs.h> 64#include <sys/cdefs.h>
65__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.221 2018/11/15 09:38:57 maxv Exp $"); 65__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.222 2018/11/15 10:06:07 maxv Exp $");
66 66
67#ifdef _KERNEL_OPT 67#ifdef _KERNEL_OPT
68#include "opt_mbuftrace.h" 68#include "opt_mbuftrace.h"
69#include "opt_nmbclusters.h" 69#include "opt_nmbclusters.h"
70#include "opt_ddb.h" 70#include "opt_ddb.h"
71#include "ether.h" 71#include "ether.h"
72#endif 72#endif
73 73
74#include <sys/param.h> 74#include <sys/param.h>
75#include <sys/systm.h> 75#include <sys/systm.h>
76#include <sys/atomic.h> 76#include <sys/atomic.h>
77#include <sys/cpu.h> 77#include <sys/cpu.h>
78#include <sys/proc.h> 78#include <sys/proc.h>
@@ -1711,51 +1711,53 @@ m_defrag(struct mbuf *m, int how) @@ -1711,51 +1711,53 @@ m_defrag(struct mbuf *m, int how)
1711 } while (sz > 0); 1711 } while (sz > 0);
1712 1712
1713 m_freem(m->m_next); 1713 m_freem(m->m_next);
1714 m->m_next = m0; 1714 m->m_next = m0;
1715 1715
1716 return m; 1716 return m;
1717} 1717}
1718 1718
1719void 1719void
1720m_remove_pkthdr(struct mbuf *m) 1720m_remove_pkthdr(struct mbuf *m)
1721{ 1721{
1722 KASSERT(m->m_flags & M_PKTHDR); 1722 KASSERT(m->m_flags & M_PKTHDR);
1723 1723
1724 m_tag_delete_chain(m, NULL); 1724 m_tag_delete_chain(m);
1725 m->m_flags &= ~M_PKTHDR; 1725 m->m_flags &= ~M_PKTHDR;
1726 memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr)); 1726 memset(&m->m_pkthdr, 0, sizeof(m->m_pkthdr));
1727} 1727}
1728 1728
1729void 1729void
1730m_copy_pkthdr(struct mbuf *to, struct mbuf *from) 1730m_copy_pkthdr(struct mbuf *to, struct mbuf *from)
1731{ 1731{
1732 KASSERT((to->m_flags & M_EXT) == 0); 1732 KASSERT((to->m_flags & M_EXT) == 0);
1733 KASSERT((to->m_flags & M_PKTHDR) == 0 || m_tag_first(to) == NULL); 1733 KASSERT((to->m_flags & M_PKTHDR) == 0 ||
 1734 SLIST_FIRST(&to->m_pkthdr.tags) == NULL);
1734 KASSERT((from->m_flags & M_PKTHDR) != 0); 1735 KASSERT((from->m_flags & M_PKTHDR) != 0);
1735 1736
1736 to->m_pkthdr = from->m_pkthdr; 1737 to->m_pkthdr = from->m_pkthdr;
1737 to->m_flags = from->m_flags & M_COPYFLAGS; 1738 to->m_flags = from->m_flags & M_COPYFLAGS;
1738 to->m_data = to->m_pktdat; 1739 to->m_data = to->m_pktdat;
1739 1740
1740 SLIST_INIT(&to->m_pkthdr.tags); 1741 SLIST_INIT(&to->m_pkthdr.tags);
1741 m_tag_copy_chain(to, from); 1742 m_tag_copy_chain(to, from);
1742} 1743}
1743 1744
1744void 1745void
1745m_move_pkthdr(struct mbuf *to, struct mbuf *from) 1746m_move_pkthdr(struct mbuf *to, struct mbuf *from)
1746{ 1747{
1747 KASSERT((to->m_flags & M_EXT) == 0); 1748 KASSERT((to->m_flags & M_EXT) == 0);
1748 KASSERT((to->m_flags & M_PKTHDR) == 0 || m_tag_first(to) == NULL); 1749 KASSERT((to->m_flags & M_PKTHDR) == 0 ||
 1750 SLIST_FIRST(&to->m_pkthdr.tags) == NULL);
1749 KASSERT((from->m_flags & M_PKTHDR) != 0); 1751 KASSERT((from->m_flags & M_PKTHDR) != 0);
1750 1752
1751 to->m_pkthdr = from->m_pkthdr; 1753 to->m_pkthdr = from->m_pkthdr;
1752 to->m_flags = from->m_flags & M_COPYFLAGS; 1754 to->m_flags = from->m_flags & M_COPYFLAGS;
1753 to->m_data = to->m_pktdat; 1755 to->m_data = to->m_pktdat;
1754 1756
1755 from->m_flags &= ~M_PKTHDR; 1757 from->m_flags &= ~M_PKTHDR;
1756} 1758}
1757 1759
1758/* 1760/*
1759 * Apply function f to the data in an mbuf chain starting "off" bytes from the 1761 * Apply function f to the data in an mbuf chain starting "off" bytes from the
1760 * beginning, continuing for "len" bytes. 1762 * beginning, continuing for "len" bytes.
1761 */ 1763 */
@@ -1895,27 +1897,27 @@ m_ext_free(struct mbuf *m) @@ -1895,27 +1897,27 @@ m_ext_free(struct mbuf *m)
1895/* 1897/*
1896 * Free a single mbuf and associated external storage. Return the 1898 * Free a single mbuf and associated external storage. Return the
1897 * successor, if any. 1899 * successor, if any.
1898 */ 1900 */
1899struct mbuf * 1901struct mbuf *
1900m_free(struct mbuf *m) 1902m_free(struct mbuf *m)
1901{ 1903{
1902 struct mbuf *n; 1904 struct mbuf *n;
1903 1905
1904 mowner_revoke(m, 1, m->m_flags); 1906 mowner_revoke(m, 1, m->m_flags);
1905 mbstat_type_add(m->m_type, -1); 1907 mbstat_type_add(m->m_type, -1);
1906 1908
1907 if (m->m_flags & M_PKTHDR) 1909 if (m->m_flags & M_PKTHDR)
1908 m_tag_delete_chain(m, NULL); 1910 m_tag_delete_chain(m);
1909 1911
1910 n = m->m_next; 1912 n = m->m_next;
1911 1913
1912 if (m->m_flags & M_EXT) { 1914 if (m->m_flags & M_EXT) {
1913 m_ext_free(m); 1915 m_ext_free(m);
1914 } else { 1916 } else {
1915 if (__predict_false(m->m_type == MT_FREE)) { 1917 if (__predict_false(m->m_type == MT_FREE)) {
1916 panic("mbuf %p already freed", m); 1918 panic("mbuf %p already freed", m);
1917 } 1919 }
1918 m->m_type = MT_FREE; 1920 m->m_type = MT_FREE;
1919 m->m_data = NULL; 1921 m->m_data = NULL;
1920 pool_cache_put(mb_cache, m); 1922 pool_cache_put(mb_cache, m);
1921 } 1923 }
@@ -2247,49 +2249,38 @@ void @@ -2247,49 +2249,38 @@ void
2247m_tag_unlink(struct mbuf *m, struct m_tag *t) 2249m_tag_unlink(struct mbuf *m, struct m_tag *t)
2248{ 2250{
2249 SLIST_REMOVE(&m->m_pkthdr.tags, t, m_tag, m_tag_link); 2251 SLIST_REMOVE(&m->m_pkthdr.tags, t, m_tag, m_tag_link);
2250} 2252}
2251 2253
2252void 2254void
2253m_tag_delete(struct mbuf *m, struct m_tag *t) 2255m_tag_delete(struct mbuf *m, struct m_tag *t)
2254{ 2256{
2255 m_tag_unlink(m, t); 2257 m_tag_unlink(m, t);
2256 m_tag_free(t); 2258 m_tag_free(t);
2257} 2259}
2258 2260
2259void 2261void
2260m_tag_delete_chain(struct mbuf *m, struct m_tag *t) 2262m_tag_delete_chain(struct mbuf *m)
2261{ 2263{
2262 struct m_tag *p, *q; 2264 struct m_tag *p, *q;
2263 2265
2264 if (t != NULL) 2266 p = SLIST_FIRST(&m->m_pkthdr.tags);
2265 p = t; 
2266 else 
2267 p = SLIST_FIRST(&m->m_pkthdr.tags); 
2268 if (p == NULL) 2267 if (p == NULL)
2269 return; 2268 return;
2270 while ((q = SLIST_NEXT(p, m_tag_link)) != NULL) 2269 while ((q = SLIST_NEXT(p, m_tag_link)) != NULL)
2271 m_tag_delete(m, q); 2270 m_tag_delete(m, q);
2272 m_tag_delete(m, p); 2271 m_tag_delete(m, p);
2273} 2272}
2274 2273
2275void 
2276m_tag_delete_nonpersistent(struct mbuf *m) 
2277{ 
2278 /* NetBSD has no persistent tags yet, so just delete all tags. */ 
2279 m_tag_delete_chain(m, NULL); 
2280} 
2281 
2282 
2283struct m_tag * 2274struct m_tag *
2284m_tag_find(const struct mbuf *m, int type, struct m_tag *t) 2275m_tag_find(const struct mbuf *m, int type, struct m_tag *t)
2285{ 2276{
2286 struct m_tag *p; 2277 struct m_tag *p;
2287 2278
2288 if (t == NULL) 2279 if (t == NULL)
2289 p = SLIST_FIRST(&m->m_pkthdr.tags); 2280 p = SLIST_FIRST(&m->m_pkthdr.tags);
2290 else 2281 else
2291 p = SLIST_NEXT(t, m_tag_link); 2282 p = SLIST_NEXT(t, m_tag_link);
2292 while (p != NULL) { 2283 while (p != NULL) {
2293 if (p->m_tag_id == type) 2284 if (p->m_tag_id == type)
2294 return p; 2285 return p;
2295 p = SLIST_NEXT(p, m_tag_link); 2286 p = SLIST_NEXT(p, m_tag_link);
@@ -2310,46 +2301,28 @@ m_tag_copy(struct m_tag *t) @@ -2310,46 +2301,28 @@ m_tag_copy(struct m_tag *t)
2310} 2301}
2311 2302
2312/* 2303/*
2313 * Copy two tag chains. The destination mbuf (to) loses any attached 2304 * Copy two tag chains. The destination mbuf (to) loses any attached
2314 * tags even if the operation fails. This should not be a problem, as 2305 * tags even if the operation fails. This should not be a problem, as
2315 * m_tag_copy_chain() is typically called with a newly-allocated 2306 * m_tag_copy_chain() is typically called with a newly-allocated
2316 * destination mbuf. 2307 * destination mbuf.
2317 */ 2308 */
2318int 2309int
2319m_tag_copy_chain(struct mbuf *to, struct mbuf *from) 2310m_tag_copy_chain(struct mbuf *to, struct mbuf *from)
2320{ 2311{
2321 struct m_tag *p, *t, *tprev = NULL; 2312 struct m_tag *p, *t, *tprev = NULL;
2322 2313
2323 m_tag_delete_chain(to, NULL); 2314 m_tag_delete_chain(to);
2324 SLIST_FOREACH(p, &from->m_pkthdr.tags, m_tag_link) { 2315 SLIST_FOREACH(p, &from->m_pkthdr.tags, m_tag_link) {
2325 t = m_tag_copy(p); 2316 t = m_tag_copy(p);
2326 if (t == NULL) { 2317 if (t == NULL) {
2327 m_tag_delete_chain(to, NULL); 2318 m_tag_delete_chain(to);
2328 return 0; 2319 return 0;
2329 } 2320 }
2330 if (tprev == NULL) 2321 if (tprev == NULL)
2331 SLIST_INSERT_HEAD(&to->m_pkthdr.tags, t, m_tag_link); 2322 SLIST_INSERT_HEAD(&to->m_pkthdr.tags, t, m_tag_link);
2332 else 2323 else
2333 SLIST_INSERT_AFTER(tprev, t, m_tag_link); 2324 SLIST_INSERT_AFTER(tprev, t, m_tag_link);
2334 tprev = t; 2325 tprev = t;
2335 } 2326 }
2336 return 1; 2327 return 1;
2337} 2328}
2338 
2339void 
2340m_tag_init(struct mbuf *m) 
2341{ 
2342 SLIST_INIT(&m->m_pkthdr.tags); 
2343} 
2344 
2345struct m_tag * 
2346m_tag_first(struct mbuf *m) 
2347{ 
2348 return (SLIST_FIRST(&m->m_pkthdr.tags)); 
2349} 
2350 
2351struct m_tag * 
2352m_tag_next(struct mbuf *m, struct m_tag *t) 
2353{ 
2354 return (SLIST_NEXT(t, m_tag_link)); 
2355} 

cvs diff -r1.105 -r1.106 src/sys/net/if_loop.c (expand / switch to unified diff)

--- src/sys/net/if_loop.c 2018/08/10 06:46:09 1.105
+++ src/sys/net/if_loop.c 2018/11/15 10:06:07 1.106
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_loop.c,v 1.105 2018/08/10 06:46:09 maxv Exp $ */ 1/* $NetBSD: if_loop.c,v 1.106 2018/11/15 10:06:07 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 4 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -55,27 +55,27 @@ @@ -55,27 +55,27 @@
55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 55 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 56 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 57 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58 * SUCH DAMAGE. 58 * SUCH DAMAGE.
59 * 59 *
60 * @(#)if_loop.c 8.2 (Berkeley) 1/9/95 60 * @(#)if_loop.c 8.2 (Berkeley) 1/9/95
61 */ 61 */
62 62
63/* 63/*
64 * Loopback interface driver for protocol testing and timing. 64 * Loopback interface driver for protocol testing and timing.
65 */ 65 */
66 66
67#include <sys/cdefs.h> 67#include <sys/cdefs.h>
68__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.105 2018/08/10 06:46:09 maxv Exp $"); 68__KERNEL_RCSID(0, "$NetBSD: if_loop.c,v 1.106 2018/11/15 10:06:07 maxv Exp $");
69 69
70#ifdef _KERNEL_OPT 70#ifdef _KERNEL_OPT
71#include "opt_inet.h" 71#include "opt_inet.h"
72#include "opt_atalk.h" 72#include "opt_atalk.h"
73#include "opt_mbuftrace.h" 73#include "opt_mbuftrace.h"
74#include "opt_mpls.h" 74#include "opt_mpls.h"
75#include "opt_net_mpsafe.h" 75#include "opt_net_mpsafe.h"
76#endif 76#endif
77 77
78#include <sys/param.h> 78#include <sys/param.h>
79#include <sys/systm.h> 79#include <sys/systm.h>
80#include <sys/kernel.h> 80#include <sys/kernel.h>
81#include <sys/mbuf.h> 81#include <sys/mbuf.h>
@@ -288,27 +288,27 @@ looutput(struct ifnet *ifp, struct mbuf  @@ -288,27 +288,27 @@ looutput(struct ifnet *ifp, struct mbuf
288 288
289 M_PREPEND(m, sizeof(uint32_t), M_DONTWAIT); 289 M_PREPEND(m, sizeof(uint32_t), M_DONTWAIT);
290 if (m == NULL) { 290 if (m == NULL) {
291 error = ENOBUFS; 291 error = ENOBUFS;
292 goto out; 292 goto out;
293 } 293 }
294 *(mtod(m, uint32_t *)) = dst->sa_family; 294 *(mtod(m, uint32_t *)) = dst->sa_family;
295 295
296 error = if_transmit_lock(ifp, m); 296 error = if_transmit_lock(ifp, m);
297 goto out; 297 goto out;
298 } 298 }
299#endif /* ALTQ */ 299#endif /* ALTQ */
300 300
301 m_tag_delete_nonpersistent(m); 301 m_tag_delete_chain(m);
302 302
303#ifdef MPLS 303#ifdef MPLS
304 if (rt != NULL && rt_gettag(rt) != NULL && 304 if (rt != NULL && rt_gettag(rt) != NULL &&
305 rt_gettag(rt)->sa_family == AF_MPLS && 305 rt_gettag(rt)->sa_family == AF_MPLS &&
306 (m->m_flags & (M_MCAST | M_BCAST)) == 0) { 306 (m->m_flags & (M_MCAST | M_BCAST)) == 0) {
307 union mpls_shim msh; 307 union mpls_shim msh;
308 msh.s_addr = MPLS_GETSADDR(rt); 308 msh.s_addr = MPLS_GETSADDR(rt);
309 if (msh.shim.label != MPLS_LABEL_IMPLNULL) { 309 if (msh.shim.label != MPLS_LABEL_IMPLNULL) {
310 ifq = &mplsintrq; 310 ifq = &mplsintrq;
311 isr = NETISR_MPLS; 311 isr = NETISR_MPLS;
312 } 312 }
313 } 313 }
314 if (isr != NETISR_MPLS) 314 if (isr != NETISR_MPLS)

cvs diff -r1.4 -r1.5 src/sys/netcan/can.c (expand / switch to unified diff)

--- src/sys/netcan/can.c 2018/06/26 06:48:03 1.4
+++ src/sys/netcan/can.c 2018/11/15 10:06:07 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: can.c,v 1.4 2018/06/26 06:48:03 msaitoh Exp $ */ 1/* $NetBSD: can.c,v 1.5 2018/11/15 10:06:07 maxv Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003, 2017 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003, 2017 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Robert Swindells and Manuel Bouyer 8 * by Robert Swindells and Manuel Bouyer
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -20,27 +20,27 @@ @@ -20,27 +20,27 @@
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.4 2018/06/26 06:48:03 msaitoh Exp $"); 33__KERNEL_RCSID(0, "$NetBSD: can.c,v 1.5 2018/11/15 10:06:07 maxv Exp $");
34 34
35#include <sys/param.h> 35#include <sys/param.h>
36#include <sys/systm.h> 36#include <sys/systm.h>
37#include <sys/mbuf.h> 37#include <sys/mbuf.h>
38#include <sys/ioctl.h> 38#include <sys/ioctl.h>
39#include <sys/domain.h> 39#include <sys/domain.h>
40#include <sys/protosw.h> 40#include <sys/protosw.h>
41#include <sys/errno.h> 41#include <sys/errno.h>
42#include <sys/socket.h> 42#include <sys/socket.h>
43#include <sys/socketvar.h> 43#include <sys/socketvar.h>
44#include <sys/proc.h> 44#include <sys/proc.h>
45#include <sys/kauth.h> 45#include <sys/kauth.h>
46 46
@@ -261,27 +261,27 @@ can_output(struct mbuf *m, struct canpcb @@ -261,27 +261,27 @@ can_output(struct mbuf *m, struct canpcb
261 261
262/* 262/*
263 * cleanup mbuf tag, keeping the PACKET_TAG_SO tag 263 * cleanup mbuf tag, keeping the PACKET_TAG_SO tag
264 */ 264 */
265void 265void
266can_mbuf_tag_clean(struct mbuf *m) 266can_mbuf_tag_clean(struct mbuf *m)
267{ 267{
268 struct m_tag *sotag; 268 struct m_tag *sotag;
269 269
270 sotag = m_tag_find(m, PACKET_TAG_SO, NULL); 270 sotag = m_tag_find(m, PACKET_TAG_SO, NULL);
271 if (sotag) 271 if (sotag)
272 m_tag_unlink(m, sotag); 272 m_tag_unlink(m, sotag);
273 273
274 m_tag_delete_nonpersistent(m); 274 m_tag_delete_chain(m);
275 if (sotag) 275 if (sotag)
276 m_tag_prepend(m, sotag); 276 m_tag_prepend(m, sotag);
277} 277}
278 278
279/* 279/*
280 * Process a received CAN frame 280 * Process a received CAN frame
281 * the packet is in the mbuf chain m with 281 * the packet is in the mbuf chain m with
282 * the CAN header. 282 * the CAN header.
283 */ 283 */
284void 284void
285can_input(struct ifnet *ifp, struct mbuf *m) 285can_input(struct ifnet *ifp, struct mbuf *m)
286{ 286{
287 struct ifqueue *inq; 287 struct ifqueue *inq;

cvs diff -r1.174 -r1.175 src/sys/netinet/ip_icmp.c (expand / switch to unified diff)

--- src/sys/netinet/ip_icmp.c 2018/09/14 05:09:51 1.174
+++ src/sys/netinet/ip_icmp.c 2018/11/15 10:06:07 1.175
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ip_icmp.c,v 1.174 2018/09/14 05:09:51 maxv Exp $ */ 1/* $NetBSD: ip_icmp.c,v 1.175 2018/11/15 10:06:07 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. 4 * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Public Access Networks Corporation ("Panix"). It was developed under 8 * by Public Access Networks Corporation ("Panix"). It was developed under
9 * contract to Panix by Eric Haszlakiewicz and Thor Lancelot Simon. 9 * contract to Panix by Eric Haszlakiewicz and Thor Lancelot Simon.
10 * 10 *
11 * This code is derived from software contributed to The NetBSD Foundation 11 * This code is derived from software contributed to The NetBSD Foundation
12 * by Jason R. Thorpe of Zembu Labs, Inc. 12 * by Jason R. Thorpe of Zembu Labs, Inc.
13 * 13 *
14 * Redistribution and use in source and binary forms, with or without 14 * Redistribution and use in source and binary forms, with or without
@@ -84,27 +84,27 @@ @@ -84,27 +84,27 @@
84 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 84 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
85 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 85 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
86 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 86 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
87 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 87 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
88 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 88 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
89 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 89 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
90 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 90 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
91 * SUCH DAMAGE. 91 * SUCH DAMAGE.
92 * 92 *
93 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94 93 * @(#)ip_icmp.c 8.2 (Berkeley) 1/4/94
94 */ 94 */
95 95
96#include <sys/cdefs.h> 96#include <sys/cdefs.h>
97__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.174 2018/09/14 05:09:51 maxv Exp $"); 97__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.175 2018/11/15 10:06:07 maxv Exp $");
98 98
99#ifdef _KERNEL_OPT 99#ifdef _KERNEL_OPT
100#include "opt_ipsec.h" 100#include "opt_ipsec.h"
101#endif 101#endif
102 102
103#include <sys/param.h> 103#include <sys/param.h>
104#include <sys/systm.h> 104#include <sys/systm.h>
105#include <sys/mbuf.h> 105#include <sys/mbuf.h>
106#include <sys/protosw.h> 106#include <sys/protosw.h>
107#include <sys/socket.h> 107#include <sys/socket.h>
108#include <sys/socketvar.h> /* For softnet_lock */ 108#include <sys/socketvar.h> /* For softnet_lock */
109#include <sys/kmem.h> 109#include <sys/kmem.h>
110#include <sys/time.h> 110#include <sys/time.h>
@@ -909,27 +909,27 @@ icmp_reflect(struct mbuf *m) @@ -909,27 +909,27 @@ icmp_reflect(struct mbuf *m)
909 /* 909 /*
910 * Now strip out original options by copying rest of first 910 * Now strip out original options by copying rest of first
911 * mbuf's data back, and adjust the IP length. 911 * mbuf's data back, and adjust the IP length.
912 */ 912 */
913 ip->ip_len = htons(ntohs(ip->ip_len) - optlen); 913 ip->ip_len = htons(ntohs(ip->ip_len) - optlen);
914 ip->ip_hl = sizeof(struct ip) >> 2; 914 ip->ip_hl = sizeof(struct ip) >> 2;
915 m->m_len -= optlen; 915 m->m_len -= optlen;
916 if (m->m_flags & M_PKTHDR) 916 if (m->m_flags & M_PKTHDR)
917 m->m_pkthdr.len -= optlen; 917 m->m_pkthdr.len -= optlen;
918 optlen += sizeof(struct ip); 918 optlen += sizeof(struct ip);
919 memmove(ip + 1, (char *)ip + optlen, 919 memmove(ip + 1, (char *)ip + optlen,
920 (unsigned)(m->m_len - sizeof(struct ip))); 920 (unsigned)(m->m_len - sizeof(struct ip)));
921 } 921 }
922 m_tag_delete_nonpersistent(m); 922 m_tag_delete_chain(m);
923 m->m_flags &= ~(M_BCAST|M_MCAST); 923 m->m_flags &= ~(M_BCAST|M_MCAST);
924 924
925 /* 925 /*
926 * Clear any in-bound checksum flags for this packet. 926 * Clear any in-bound checksum flags for this packet.
927 */ 927 */
928 if (m->m_flags & M_PKTHDR) 928 if (m->m_flags & M_PKTHDR)
929 m->m_pkthdr.csum_flags = 0; 929 m->m_pkthdr.csum_flags = 0;
930 930
931 icmp_send(m, opts); 931 icmp_send(m, opts);
932done: 932done:
933 curlwp_bindx(bound); 933 curlwp_bindx(bound);
934 if (opts) 934 if (opts)
935 (void)m_free(opts); 935 (void)m_free(opts);

cvs diff -r1.211 -r1.212 src/sys/sys/mbuf.h (expand / switch to unified diff)

--- src/sys/sys/mbuf.h 2018/10/12 05:49:38 1.211
+++ src/sys/sys/mbuf.h 2018/11/15 10:06:07 1.212
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mbuf.h,v 1.211 2018/10/12 05:49:38 msaitoh Exp $ */ 1/* $NetBSD: mbuf.h,v 1.212 2018/11/15 10:06:07 maxv Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc. 4 * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, 8 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 * NASA Ames Research Center and Matt Thomas of 3am Software Foundry. 9 * NASA Ames Research Center and Matt Thomas of 3am Software Foundry.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -808,34 +808,30 @@ struct mbuf *m_add(struct mbuf *, struct @@ -808,34 +808,30 @@ struct mbuf *m_add(struct mbuf *, struct
808 808
809/* Inline routines. */ 809/* Inline routines. */
810static __inline u_int m_length(const struct mbuf *) __unused; 810static __inline u_int m_length(const struct mbuf *) __unused;
811 811
812/* Statistics */ 812/* Statistics */
813void mbstat_type_add(int, int); 813void mbstat_type_add(int, int);
814 814
815/* Packet tag routines */ 815/* Packet tag routines */
816struct m_tag *m_tag_get(int, int, int); 816struct m_tag *m_tag_get(int, int, int);
817void m_tag_free(struct m_tag *); 817void m_tag_free(struct m_tag *);
818void m_tag_prepend(struct mbuf *, struct m_tag *); 818void m_tag_prepend(struct mbuf *, struct m_tag *);
819void m_tag_unlink(struct mbuf *, struct m_tag *); 819void m_tag_unlink(struct mbuf *, struct m_tag *);
820void m_tag_delete(struct mbuf *, struct m_tag *); 820void m_tag_delete(struct mbuf *, struct m_tag *);
821void m_tag_delete_chain(struct mbuf *, struct m_tag *); 821void m_tag_delete_chain(struct mbuf *);
822void m_tag_delete_nonpersistent(struct mbuf *); 
823struct m_tag *m_tag_find(const struct mbuf *, int, struct m_tag *); 822struct m_tag *m_tag_find(const struct mbuf *, int, struct m_tag *);
824struct m_tag *m_tag_copy(struct m_tag *); 823struct m_tag *m_tag_copy(struct m_tag *);
825int m_tag_copy_chain(struct mbuf *, struct mbuf *); 824int m_tag_copy_chain(struct mbuf *, struct mbuf *);
826void m_tag_init(struct mbuf *); 
827struct m_tag *m_tag_first(struct mbuf *); 
828struct m_tag *m_tag_next(struct mbuf *, struct m_tag *); 
829 825
830/* Packet tag types */ 826/* Packet tag types */
831#define PACKET_TAG_NONE 0 /* Nothing */ 827#define PACKET_TAG_NONE 0 /* Nothing */
832#define PACKET_TAG_SO 4 /* sending socket pointer */ 828#define PACKET_TAG_SO 4 /* sending socket pointer */
833#define PACKET_TAG_PF 11 /* packet filter */ 829#define PACKET_TAG_PF 11 /* packet filter */
834#define PACKET_TAG_ALTQ_QID 12 /* ALTQ queue id */ 830#define PACKET_TAG_ALTQ_QID 12 /* ALTQ queue id */
835#define PACKET_TAG_IPSEC_OUT_DONE 18 831#define PACKET_TAG_IPSEC_OUT_DONE 18
836#define PACKET_TAG_IPSEC_NAT_T_PORTS 25 /* two uint16_t */ 832#define PACKET_TAG_IPSEC_NAT_T_PORTS 25 /* two uint16_t */
837#define PACKET_TAG_INET6 26 /* IPv6 info */ 833#define PACKET_TAG_INET6 26 /* IPv6 info */
838#define PACKET_TAG_TUNNEL_INFO 28 /* tunnel identification and 834#define PACKET_TAG_TUNNEL_INFO 28 /* tunnel identification and
839 * protocol callback, for 835 * protocol callback, for
840 * loop detection/recovery 836 * loop detection/recovery
841 */ 837 */