Index: head/lib/Makefile =================================================================== --- head/lib/Makefile (revision 353282) +++ head/lib/Makefile (revision 353283) @@ -1,216 +1,217 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 # $FreeBSD$ .include # The SUBDIR_BOOTSTRAP list is a small set of libraries which are used by many # of the other libraries. These are built first with a .WAIT between them # and the main list to avoid needing a SUBDIR_DEPEND line on every library # naming just these few items. SUBDIR_BOOTSTRAP= \ csu \ .WAIT \ libc \ libc_nonshared \ libcompiler_rt \ ${_libclang_rt} \ ${_libcplusplus} \ ${_libcxxrt} \ libelf \ msun # The main list; please keep these sorted alphabetically. SUBDIR= ${SUBDIR_BOOTSTRAP} \ .WAIT \ geom \ libalias \ libarchive \ libauditd \ libbegemot \ libblocksruntime \ libbsdstat \ libbsm \ libbz2 \ libcalendar \ libcam \ libcapsicum \ libcasper \ libcompat \ libcrypt \ libdevctl \ libdevinfo \ libdevstat \ libdl \ libdwarf \ libedit \ libelftc \ libevent \ libexecinfo \ libexpat \ libfetch \ libfigpar \ libgeom \ libifconfig \ libipsec \ libjail \ libkiconv \ libkvm \ liblzma \ libmemstat \ libmd \ libmt \ lib80211 \ libnetbsd \ libnv \ libopenbsd \ libopie \ libpam \ libpathconv \ libpcap \ libpjdlog \ ${_libproc} \ libprocstat \ libregex \ librpcsvc \ librss \ librt \ ${_librtld_db} \ libsbuf \ libsmb \ libsqlite3 \ libstdbuf \ libstdthreads \ libsysdecode \ libtacplus \ libthread_db \ libucl \ libufs \ libugidfw \ libulog \ libutil \ ${_libvgl} \ libwrap \ libxo \ liby \ libz \ libzstd \ ncurses # Inter-library dependencies. When the makefile for a library contains LDADD # libraries, those libraries should be listed as build order dependencies here. SUBDIR_DEPEND_geom= libufs SUBDIR_DEPEND_libarchive= libz libbz2 libexpat liblzma libmd libzstd SUBDIR_DEPEND_libauditdm= libbsm SUBDIR_DEPEND_libbsnmp= ${_libnetgraph} SUBDIR_DEPEND_libc++:= libcxxrt SUBDIR_DEPEND_libc= libcompiler_rt SUBDIR_DEPEND_libcam= libsbuf SUBDIR_DEPEND_libcasper= libnv SUBDIR_DEPEND_libdevstat= libkvm SUBDIR_DEPEND_libdpv= libfigpar ncurses libutil SUBDIR_DEPEND_libedit= ncurses SUBDIR_DEPEND_libgeom= libexpat libsbuf SUBDIR_DEPEND_librpcsec_gss= libgssapi SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd SUBDIR_DEPEND_libsmb= libkiconv SUBDIR_DEPEND_libtacplus= libmd SUBDIR_DEPEND_libulog= libmd SUBDIR_DEPEND_libunbound= ${_libldns} SUBDIR_DEPEND_liblzma= ${_libthr} .if ${MK_OFED} != "no" SUBDIR_DEPEND_libpcap= ofed .endif # NB: keep these sorted by MK_* knobs SUBDIR.${MK_ATM}+= libngatm SUBDIR.${MK_BEARSSL}+= libbearssl libsecureboot SUBDIR.${MK_BLACKLIST}+=libblacklist SUBDIR.${MK_BLUETOOTH}+=libbluetooth libsdp SUBDIR.${MK_BSNMP}+= libbsnmp .if !defined(COMPAT_32BIT) && !defined(COMPAT_SOFTFP) SUBDIR.${MK_CLANG}+= clang .endif SUBDIR.${MK_CUSE}+= libcuse SUBDIR.${MK_CXX}+= libdevdctl SUBDIR.${MK_TOOLCHAIN}+=libpe SUBDIR.${MK_DIALOG}+= libdpv SUBDIR.${MK_FILE}+= libmagic SUBDIR.${MK_GPIO}+= libgpio SUBDIR.${MK_GSSAPI}+= libgssapi librpcsec_gss SUBDIR.${MK_ICONV}+= libiconv_modules SUBDIR.${MK_KERBEROS_SUPPORT}+= libcom_err SUBDIR.${MK_LDNS}+= libldns +SUBDIR.${MK_STATS}+= libstats # The libraries under libclang_rt can only be built by clang, and only make # sense to build when clang is enabled at all. Furthermore, they can only be # built for certain architectures. .if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ (${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "i386") _libclang_rt= libclang_rt .endif .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ _libcplusplus+= libc++experimental _libcplusplus+= libc++fs .endif SUBDIR.${MK_EFI}+= libefivar SUBDIR.${MK_GOOGLETEST}+= googletest SUBDIR.${MK_LIBTHR}+= libthr SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_eh SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_s SUBDIR.${MK_NETGRAPH}+= libnetgraph SUBDIR.${MK_NIS}+= libypclnt .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" _libvgl= libvgl .endif .if ${MACHINE_CPUARCH} == "aarch64" SUBDIR.${MK_PMC}+= libopencsd .endif .if ${MACHINE_CPUARCH} == "amd64" SUBDIR.${MK_PMC}+= libipt SUBDIR.${MK_BHYVE}+= libvmmapi .endif .if ${MACHINE_CPUARCH} != "sparc64" _libproc= libproc _librtld_db= librtld_db .endif SUBDIR.${MK_OPENMP}+= libomp SUBDIR.${MK_OPENSSL}+= libmp SUBDIR.${MK_PMC}+= libpmc libpmcstat SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_TESTS_SUPPORT}+= atf SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound SUBDIR.${MK_USB}+= libusbhid libusb SUBDIR.${MK_OFED}+= ofed SUBDIR.${MK_VERIEXEC}+= libveriexec SUBDIR.${MK_ZFS}+= libbe .if !make(install) SUBDIR_PARALLEL= .endif .include Index: head/lib/libstats/Makefile =================================================================== --- head/lib/libstats/Makefile (nonexistent) +++ head/lib/libstats/Makefile (revision 353283) @@ -0,0 +1,14 @@ +# $FreeBSD$ + +LIB= stats +SHLIBDIR?= /lib +SHLIB_MAJOR= 0 +SRCS= subr_stats.c + +# To debug, comment WITHOUT_ASSERT_DEBUG= and uncomment CFLAGS:= +WITHOUT_ASSERT_DEBUG= +#CFLAGS:=${CFLAGS:C/-O[0-9]/-O0 -g3/} -DDIAGNOSTIC + +.PATH: ${.CURDIR}/../../sys/kern + +.include Property changes on: head/lib/libstats/Makefile ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/share/man/man3/Makefile =================================================================== --- head/share/man/man3/Makefile (revision 353282) +++ head/share/man/man3/Makefile (revision 353283) @@ -1,483 +1,506 @@ # @(#)Makefile 8.2 (Berkeley) 12/13/93 # $FreeBSD$ .include MAN= arb.3 \ assert.3 \ ATOMIC_VAR_INIT.3 \ bitstring.3 \ CMSG_DATA.3 \ end.3 \ fpgetround.3 \ intro.3 \ makedev.3 \ offsetof.3 \ ${PTHREAD_MAN} \ Q_FRAWMASK.3 \ Q_IFRAWMASK.3 \ Q_INI.3 \ Q_IRAWMASK.3 \ Q_QABS.3 \ Q_QADDI.3 \ Q_QADDQ.3 \ Q_SIGNED.3 \ Q_SIGNSHFT.3 \ qmath.3 \ queue.3 \ sigevent.3 \ siginfo.3 \ + stats.3 \ stdarg.3 \ sysexits.3 \ tgmath.3 \ timeradd.3 \ tree.3 MLINKS= arb.3 ARB8_ENTRY.3 \ arb.3 ARB8_HEAD.3 \ arb.3 ARB16_ENTRY.3 \ arb.3 ARB16_HEAD.3 \ arb.3 ARB32_ENTRY.3 \ arb.3 ARB32_HEAD.3 \ arb.3 ARB_ALLOCSIZE.3 \ arb.3 ARB_CURNODES.3 \ arb.3 ARB_EMPTY.3 \ arb.3 ARB_FIND.3 \ arb.3 ARB_FOREACH.3 \ arb.3 ARB_FOREACH_FROM.3 \ arb.3 ARB_FOREACH_REVERSE.3 \ arb.3 ARB_FOREACH_REVERSE_FROM.3 \ arb.3 ARB_FOREACH_REVERSE_SAFE.3 \ arb.3 ARB_FOREACH_SAFE.3 \ arb.3 ARB_FREEIDX.3 \ arb.3 ARB_FULL.3 \ arb.3 ARB_GETFREE.3 \ arb.3 ARB_INIT.3 \ arb.3 ARB_INITIALIZER.3 \ arb.3 ARB_INSERT.3 \ arb.3 ARB_LEFT.3 \ arb.3 ARB_LEFTIDX.3 \ arb.3 ARB_MAX.3 \ arb.3 ARB_MAXNODES.3 \ arb.3 ARB_MIN.3 \ arb.3 ARB_NEXT.3 \ arb.3 ARB_NFIND.3 \ arb.3 ARB_PARENT.3 \ arb.3 ARB_PARENTIDX.3 \ arb.3 ARB_PREV.3 \ arb.3 ARB_REINSERT.3 \ arb.3 ARB_REMOVE.3 \ + arb.3 ARB_RESET_TREE.3 \ arb.3 ARB_RIGHT.3 \ arb.3 ARB_RIGHTIDX.3 \ arb.3 ARB_ROOT.3 MLINKS+= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \ ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak.3 \ ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_exchange.3 \ ATOMIC_VAR_INIT.3 atomic_exchange_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_add.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_add_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_and.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_and_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_or.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_or_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_sub.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_sub_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_init.3 \ ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 \ ATOMIC_VAR_INIT.3 atomic_load.3 \ ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_store.3 \ ATOMIC_VAR_INIT.3 atomic_store_explicit.3 MLINKS+= bitstring.3 bit_alloc.3 \ bitstring.3 bit_clear.3 \ bitstring.3 bit_decl.3 \ bitstring.3 bit_ffc.3 \ bitstring.3 bit_ffc_at.3 \ bitstring.3 bit_ffs.3 \ bitstring.3 bit_ffs_at.3 \ bitstring.3 bit_nclear.3 \ bitstring.3 bit_nset.3 \ bitstring.3 bit_set.3 \ bitstring.3 bitstr_size.3 \ bitstring.3 bit_test.3 MLINKS+= CMSG_DATA.3 CMSG_FIRSTHDR.3 \ CMSG_DATA.3 CMSG_LEN.3 \ CMSG_DATA.3 CMSG_NEXTHDR.3 \ CMSG_DATA.3 CMSG_SPACE.3 MLINKS+= end.3 edata.3 \ end.3 etext.3 MLINKS+= fpgetround.3 fpgetmask.3 \ fpgetround.3 fpgetprec.3 \ fpgetround.3 fpgetsticky.3 \ fpgetround.3 fpresetsticky.3 \ fpgetround.3 fpsetmask.3 \ fpgetround.3 fpsetprec.3 \ fpgetround.3 fpsetround.3 MLINKS+= makedev.3 major.3 \ makedev.3 minor.3 MLINKS+= ${PTHREAD_MLINKS} MLINKS+= Q_FRAWMASK.3 Q_GFRAW.3 \ Q_FRAWMASK.3 Q_GFABSVAL.3 \ Q_FRAWMASK.3 Q_GFVAL.3 \ Q_FRAWMASK.3 Q_SFVAL.3 MLINKS+= Q_IFRAWMASK.3 Q_IFVALIMASK.3 \ Q_IFRAWMASK.3 Q_IFVALFMASK.3 \ Q_IFRAWMASK.3 Q_GIFRAW.3 \ Q_IFRAWMASK.3 Q_GIFABSVAL.3 \ Q_IFRAWMASK.3 Q_GIFVAL.3 \ Q_IFRAWMASK.3 Q_SIFVAL.3 \ Q_IFRAWMASK.3 Q_SIFVALS.3 MLINKS+= Q_INI.3 Q_NCBITS.3 \ Q_INI.3 Q_BT.3 \ Q_INI.3 Q_TC.3 \ Q_INI.3 Q_NTBITS.3 \ Q_INI.3 Q_NFCBITS.3 \ Q_INI.3 Q_MAXNFBITS.3 \ Q_INI.3 Q_NFBITS.3 \ Q_INI.3 Q_NIBITS.3 \ Q_INI.3 Q_RPSHFT.3 \ Q_INI.3 Q_ABS.3 \ Q_INI.3 Q_MAXSTRLEN.3 \ Q_INI.3 Q_TOSTR.3 \ Q_INI.3 Q_SHL.3 \ Q_INI.3 Q_SHR.3 \ Q_INI.3 Q_DEBUG.3 \ Q_INI.3 Q_DFV2BFV.3 MLINKS+= Q_IRAWMASK.3 Q_GIRAW.3 \ Q_IRAWMASK.3 Q_GIABSVAL.3 \ Q_IRAWMASK.3 Q_GIVAL.3 \ Q_IRAWMASK.3 Q_SIVAL.3 MLINKS+= Q_QABS.3 Q_Q2D.3 \ Q_QABS.3 Q_Q2F.3 MLINKS+= Q_QADDI.3 Q_QDIVI.3 \ Q_QADDI.3 Q_QMULI.3 \ Q_QADDI.3 Q_QSUBI.3 \ Q_QADDI.3 Q_QFRACI.3 \ Q_QADDI.3 Q_QCPYVALI.3 MLINKS+= Q_QADDQ.3 Q_QDIVQ.3 \ Q_QADDQ.3 Q_QMULQ.3 \ Q_QADDQ.3 Q_QSUBQ.3 \ Q_QADDQ.3 Q_NORMPREC.3 \ Q_QADDQ.3 Q_QMAXQ.3 \ Q_QADDQ.3 Q_QMINQ.3 \ Q_QADDQ.3 Q_QCLONEQ.3 \ Q_QADDQ.3 Q_QCPYVALQ.3 MLINKS+= Q_SIGNED.3 Q_LTZ.3 \ Q_SIGNED.3 Q_PRECEQ.3 \ Q_SIGNED.3 Q_QLTQ.3 \ Q_SIGNED.3 Q_QLEQ.3 \ Q_SIGNED.3 Q_QGTQ.3 \ Q_SIGNED.3 Q_QGEQ.3 \ Q_SIGNED.3 Q_QEQ.3 \ Q_SIGNED.3 Q_QNEQ.3 \ Q_SIGNED.3 Q_OFLOW.3 \ Q_SIGNED.3 Q_RELPREC.3 MLINKS+= Q_SIGNSHFT.3 Q_SSIGN.3 \ Q_SIGNSHFT.3 Q_CRAWMASK.3 \ Q_SIGNSHFT.3 Q_SRAWMASK.3 \ Q_SIGNSHFT.3 Q_GCRAW.3 \ Q_SIGNSHFT.3 Q_GCVAL.3 \ Q_SIGNSHFT.3 Q_SCVAL.3 MLINKS+= queue.3 LIST_CLASS_ENTRY.3 \ queue.3 LIST_CLASS_HEAD.3 \ queue.3 LIST_EMPTY.3 \ queue.3 LIST_ENTRY.3 \ queue.3 LIST_FIRST.3 \ queue.3 LIST_FOREACH.3 \ queue.3 LIST_FOREACH_FROM.3 \ queue.3 LIST_FOREACH_FROM_SAFE.3 \ queue.3 LIST_FOREACH_SAFE.3 \ queue.3 LIST_HEAD.3 \ queue.3 LIST_HEAD_INITIALIZER.3 \ queue.3 LIST_INIT.3 \ queue.3 LIST_INSERT_AFTER.3 \ queue.3 LIST_INSERT_BEFORE.3 \ queue.3 LIST_INSERT_HEAD.3 \ queue.3 LIST_NEXT.3 \ queue.3 LIST_PREV.3 \ queue.3 LIST_REMOVE.3 \ queue.3 LIST_SWAP.3 \ queue.3 SLIST_CLASS_ENTRY.3 \ queue.3 SLIST_CLASS_HEAD.3 \ queue.3 SLIST_EMPTY.3 \ queue.3 SLIST_ENTRY.3 \ queue.3 SLIST_FIRST.3 \ queue.3 SLIST_FOREACH.3 \ queue.3 SLIST_FOREACH_FROM.3 \ queue.3 SLIST_FOREACH_FROM_SAFE.3 \ queue.3 SLIST_FOREACH_SAFE.3 \ queue.3 SLIST_HEAD.3 \ queue.3 SLIST_HEAD_INITIALIZER.3 \ queue.3 SLIST_INIT.3 \ queue.3 SLIST_INSERT_AFTER.3 \ queue.3 SLIST_INSERT_HEAD.3 \ queue.3 SLIST_NEXT.3 \ queue.3 SLIST_REMOVE.3 \ queue.3 SLIST_REMOVE_AFTER.3 \ queue.3 SLIST_REMOVE_HEAD.3 \ queue.3 SLIST_REMOVE_PREVPTR.3 \ queue.3 SLIST_SWAP.3 \ queue.3 STAILQ_CLASS_ENTRY.3 \ queue.3 STAILQ_CLASS_HEAD.3 \ queue.3 STAILQ_CONCAT.3 \ queue.3 STAILQ_EMPTY.3 \ queue.3 STAILQ_ENTRY.3 \ queue.3 STAILQ_FIRST.3 \ queue.3 STAILQ_FOREACH.3 \ queue.3 STAILQ_FOREACH_FROM.3 \ queue.3 STAILQ_FOREACH_FROM_SAFE.3 \ queue.3 STAILQ_FOREACH_SAFE.3 \ queue.3 STAILQ_HEAD.3 \ queue.3 STAILQ_HEAD_INITIALIZER.3 \ queue.3 STAILQ_INIT.3 \ queue.3 STAILQ_INSERT_AFTER.3 \ queue.3 STAILQ_INSERT_HEAD.3 \ queue.3 STAILQ_INSERT_TAIL.3 \ queue.3 STAILQ_LAST.3 \ queue.3 STAILQ_NEXT.3 \ queue.3 STAILQ_REMOVE.3 \ queue.3 STAILQ_REMOVE_AFTER.3 \ queue.3 STAILQ_REMOVE_HEAD.3 \ queue.3 STAILQ_SWAP.3 \ queue.3 TAILQ_CLASS_ENTRY.3 \ queue.3 TAILQ_CLASS_HEAD.3 \ queue.3 TAILQ_CONCAT.3 \ queue.3 TAILQ_EMPTY.3 \ queue.3 TAILQ_ENTRY.3 \ queue.3 TAILQ_FIRST.3 \ queue.3 TAILQ_FOREACH.3 \ queue.3 TAILQ_FOREACH_FROM.3 \ queue.3 TAILQ_FOREACH_FROM_SAFE.3 \ queue.3 TAILQ_FOREACH_REVERSE.3 \ queue.3 TAILQ_FOREACH_REVERSE_FROM.3 \ queue.3 TAILQ_FOREACH_REVERSE_FROM_SAFE.3 \ queue.3 TAILQ_FOREACH_REVERSE_SAFE.3 \ queue.3 TAILQ_FOREACH_SAFE.3 \ queue.3 TAILQ_HEAD.3 \ queue.3 TAILQ_HEAD_INITIALIZER.3 \ queue.3 TAILQ_INIT.3 \ queue.3 TAILQ_INSERT_AFTER.3 \ queue.3 TAILQ_INSERT_BEFORE.3 \ queue.3 TAILQ_INSERT_HEAD.3 \ queue.3 TAILQ_INSERT_TAIL.3 \ queue.3 TAILQ_LAST.3 \ queue.3 TAILQ_NEXT.3 \ queue.3 TAILQ_PREV.3 \ queue.3 TAILQ_REMOVE.3 \ queue.3 TAILQ_SWAP.3 +MLINKS+= stats.3 stats_tpl_alloc.3 \ + stats.3 stats_tpl_fetch_allocid.3 \ + stats.3 stats_tpl_fetch.3 \ + stats.3 stats_tpl_id2name.3 \ + stats.3 stats_tpl_sample_rates.3 \ + stats.3 stats_tpl_sample_rollthedice.3 \ + stats.3 STATS_VSS_SUM.3 \ + stats.3 STATS_VSS_MAX.3 \ + stats.3 STATS_VSS_MIN.3 \ + stats.3 STATS_VSS_CRHIST32_LIN.3 \ + stats.3 STATS_VSS_CRHIST64_LIN.3 \ + stats.3 stats_tpl_add_voistats.3 \ + stats.3 stats_blob_alloc.3 \ + stats.3 stats_blob_init.3 \ + stats.3 stats_blob_clone.3 \ + stats.3 stats_blob_destroy.3 \ + stats.3 stats_voistat_fetch_dptr.3 \ + stats.3 stats_blob_snapshot.3 \ + stats.3 stats_blob_tostr.3 \ + stats.3 stats_voistatdata_tostr.3 \ + stats.3 stats_blob_visit.3 MLINKS+= stdarg.3 va_arg.3 \ stdarg.3 va_copy.3 \ stdarg.3 va_end.3 \ stdarg.3 varargs.3 \ stdarg.3 va_start.3 MLINKS+= timeradd.3 timerclear.3 \ timeradd.3 timercmp.3 \ timeradd.3 timerisset.3 \ timeradd.3 timersub.3 \ timeradd.3 timespecadd.3 \ timeradd.3 timespecsub.3 \ timeradd.3 timespecclear.3 \ timeradd.3 timespecisset.3 \ timeradd.3 timespeccmp.3 MLINKS+= tree.3 RB_EMPTY.3 \ tree.3 RB_ENTRY.3 \ tree.3 RB_FIND.3 \ tree.3 RB_FOREACH.3 \ tree.3 RB_FOREACH_FROM.3 \ tree.3 RB_FOREACH_REVERSE.3 \ tree.3 RB_FOREACH_REVERSE_FROM.3 \ tree.3 RB_FOREACH_REVERSE_SAFE.3 \ tree.3 RB_FOREACH_SAFE.3 \ tree.3 RB_GENERATE.3 \ tree.3 RB_GENERATE_FIND.3 \ tree.3 RB_GENERATE_INSERT.3 \ tree.3 RB_GENERATE_INSERT_COLOR.3 \ tree.3 RB_GENERATE_MINMAX.3 \ tree.3 RB_GENERATE_NEXT.3 \ tree.3 RB_GENERATE_NFIND.3 \ tree.3 RB_GENERATE_PREV.3 \ tree.3 RB_GENERATE_REMOVE.3 \ tree.3 RB_GENERATE_REMOVE_COLOR.3 \ tree.3 RB_GENERATE_STATIC.3 \ tree.3 RB_HEAD.3 \ tree.3 RB_INIT.3 \ tree.3 RB_INITIALIZER.3 \ tree.3 RB_INSERT.3 \ tree.3 RB_LEFT.3 \ tree.3 RB_MAX.3 \ tree.3 RB_MIN.3 \ tree.3 RB_NEXT.3 \ tree.3 RB_NFIND.3 \ tree.3 RB_PARENT.3 \ tree.3 RB_PREV.3 \ tree.3 RB_PROTOTYPE.3 \ tree.3 RB_PROTOTYPE_FIND.3 \ tree.3 RB_PROTOTYPE_INSERT.3 \ tree.3 RB_PROTOTYPE_INSERT_COLOR.3 \ tree.3 RB_PROTOTYPE_MINMAX.3 \ tree.3 RB_PROTOTYPE_NEXT.3 \ tree.3 RB_PROTOTYPE_NFIND.3 \ tree.3 RB_PROTOTYPE_PREV.3 \ tree.3 RB_PROTOTYPE_REMOVE.3 \ tree.3 RB_PROTOTYPE_REMOVE_COLOR.3 \ tree.3 RB_PROTOTYPE_STATIC.3 \ tree.3 RB_REINSERT.3 \ tree.3 RB_REMOVE.3 \ tree.3 RB_RIGHT.3 \ tree.3 RB_ROOT.3 \ tree.3 SPLAY_EMPTY.3 \ tree.3 SPLAY_ENTRY.3 \ tree.3 SPLAY_FIND.3 \ tree.3 SPLAY_FOREACH.3 \ tree.3 SPLAY_GENERATE.3 \ tree.3 SPLAY_HEAD.3 \ tree.3 SPLAY_INIT.3 \ tree.3 SPLAY_INITIALIZER.3 \ tree.3 SPLAY_INSERT.3 \ tree.3 SPLAY_LEFT.3 \ tree.3 SPLAY_MAX.3 \ tree.3 SPLAY_MIN.3 \ tree.3 SPLAY_NEXT.3 \ tree.3 SPLAY_PROTOTYPE.3 \ tree.3 SPLAY_REMOVE.3 \ tree.3 SPLAY_RIGHT.3 \ tree.3 SPLAY_ROOT.3 .if ${MK_LIBTHR} != "no" PTHREAD_MAN= pthread.3 \ pthread_affinity_np.3 \ pthread_atfork.3 \ pthread_attr.3 \ pthread_attr_affinity_np.3 \ pthread_attr_get_np.3 \ pthread_attr_setcreatesuspend_np.3 \ pthread_barrierattr.3 \ pthread_barrier_destroy.3 \ pthread_cancel.3 \ pthread_cleanup_pop.3 \ pthread_cleanup_push.3 \ pthread_condattr.3 \ pthread_cond_broadcast.3 \ pthread_cond_destroy.3 \ pthread_cond_init.3 \ pthread_cond_signal.3 \ pthread_cond_timedwait.3 \ pthread_cond_wait.3 \ pthread_create.3 \ pthread_detach.3 \ pthread_equal.3 \ pthread_exit.3 \ pthread_getconcurrency.3 \ pthread_getcpuclockid.3 \ pthread_getspecific.3 \ pthread_getthreadid_np.3 \ pthread_join.3 \ pthread_key_create.3 \ pthread_key_delete.3 \ pthread_kill.3 \ pthread_main_np.3 \ pthread_multi_np.3 \ pthread_mutexattr.3 \ pthread_mutexattr_getkind_np.3 \ pthread_mutex_consistent.3 \ pthread_mutex_destroy.3 \ pthread_mutex_init.3 \ pthread_mutex_lock.3 \ pthread_mutex_timedlock.3 \ pthread_mutex_trylock.3 \ pthread_mutex_unlock.3 \ pthread_once.3 \ pthread_resume_all_np.3 \ pthread_resume_np.3 \ pthread_rwlockattr_destroy.3 \ pthread_rwlockattr_getpshared.3 \ pthread_rwlockattr_init.3 \ pthread_rwlockattr_setpshared.3 \ pthread_rwlock_destroy.3 \ pthread_rwlock_init.3 \ pthread_rwlock_rdlock.3 \ pthread_rwlock_timedrdlock.3 \ pthread_rwlock_timedwrlock.3 \ pthread_rwlock_unlock.3 \ pthread_rwlock_wrlock.3 \ pthread_schedparam.3 \ pthread_self.3 \ pthread_set_name_np.3 \ pthread_setspecific.3 \ pthread_sigmask.3 \ pthread_spin_init.3 \ pthread_spin_lock.3 \ pthread_suspend_all_np.3 \ pthread_suspend_np.3 \ pthread_switch_add_np.3 \ pthread_testcancel.3 \ pthread_yield.3 PTHREAD_MLINKS= pthread_affinity_np.3 pthread_getaffinity_np.3 \ pthread_affinity_np.3 pthread_setaffinity_np.3 PTHREAD_MLINKS+=pthread_attr.3 pthread_attr_destroy.3 \ pthread_attr.3 pthread_attr_getdetachstate.3 \ pthread_attr.3 pthread_attr_getguardsize.3 \ pthread_attr.3 pthread_attr_getinheritsched.3 \ pthread_attr.3 pthread_attr_getschedparam.3 \ pthread_attr.3 pthread_attr_getschedpolicy.3 \ pthread_attr.3 pthread_attr_getscope.3 \ pthread_attr.3 pthread_attr_getstack.3 \ pthread_attr.3 pthread_attr_getstackaddr.3 \ pthread_attr.3 pthread_attr_getstacksize.3 \ pthread_attr.3 pthread_attr_init.3 \ pthread_attr.3 pthread_attr_setdetachstate.3 \ pthread_attr.3 pthread_attr_setguardsize.3 \ pthread_attr.3 pthread_attr_setinheritsched.3 \ pthread_attr.3 pthread_attr_setschedparam.3 \ pthread_attr.3 pthread_attr_setschedpolicy.3 \ pthread_attr.3 pthread_attr_setscope.3 \ pthread_attr.3 pthread_attr_setstack.3 \ pthread_attr.3 pthread_attr_setstackaddr.3 \ pthread_attr.3 pthread_attr_setstacksize.3 PTHREAD_MLINKS+=pthread_attr_affinity_np.3 pthread_attr_getaffinity_np.3 \ pthread_attr_affinity_np.3 pthread_attr_setaffinity_np.3 PTHREAD_MLINKS+=pthread_barrierattr.3 pthread_barrierattr_destroy.3 \ pthread_barrierattr.3 pthread_barrierattr_getpshared.3 \ pthread_barrierattr.3 pthread_barrierattr_init.3 \ pthread_barrierattr.3 pthread_barrierattr_setpshared.3 PTHREAD_MLINKS+=pthread_barrier_destroy.3 pthread_barrier_init.3 \ pthread_barrier_destroy.3 pthread_barrier_wait.3 PTHREAD_MLINKS+=pthread_condattr.3 pthread_condattr_destroy.3 \ pthread_condattr.3 pthread_condattr_init.3 \ pthread_condattr.3 pthread_condattr_getclock.3 \ pthread_condattr.3 pthread_condattr_setclock.3 \ pthread_condattr.3 pthread_condattr_getpshared.3 \ pthread_condattr.3 pthread_condattr_setpshared.3 PTHREAD_MLINKS+=pthread_getconcurrency.3 pthread_setconcurrency.3 PTHREAD_MLINKS+=pthread_multi_np.3 pthread_single_np.3 PTHREAD_MLINKS+=pthread_mutexattr.3 pthread_mutexattr_destroy.3 \ pthread_mutexattr.3 pthread_mutexattr_getprioceiling.3 \ pthread_mutexattr.3 pthread_mutexattr_getprotocol.3 \ pthread_mutexattr.3 pthread_mutexattr_getrobust.3 \ pthread_mutexattr.3 pthread_mutexattr_gettype.3 \ pthread_mutexattr.3 pthread_mutexattr_init.3 \ pthread_mutexattr.3 pthread_mutexattr_setprioceiling.3 \ pthread_mutexattr.3 pthread_mutexattr_setprotocol.3 \ pthread_mutexattr.3 pthread_mutexattr_setrobust.3 \ pthread_mutexattr.3 pthread_mutexattr_settype.3 PTHREAD_MLINKS+=pthread_mutexattr_getkind_np.3 pthread_mutexattr_setkind_np.3 PTHREAD_MLINKS+=pthread_rwlock_rdlock.3 pthread_rwlock_tryrdlock.3 PTHREAD_MLINKS+=pthread_rwlock_wrlock.3 pthread_rwlock_trywrlock.3 PTHREAD_MLINKS+=pthread_schedparam.3 pthread_getschedparam.3 \ pthread_schedparam.3 pthread_setschedparam.3 PTHREAD_MLINKS+=pthread_set_name_np.3 pthread_get_name_np.3 PTHREAD_MLINKS+=pthread_spin_init.3 pthread_spin_destroy.3 \ pthread_spin_lock.3 pthread_spin_trylock.3 \ pthread_spin_lock.3 pthread_spin_unlock.3 PTHREAD_MLINKS+=pthread_switch_add_np.3 pthread_switch_delete_np.3 PTHREAD_MLINKS+=pthread_testcancel.3 pthread_setcancelstate.3 \ pthread_testcancel.3 pthread_setcanceltype.3 PTHREAD_MLINKS+=pthread_join.3 pthread_timedjoin_np.3 .endif .include Index: head/share/man/man3/arb.3 =================================================================== --- head/share/man/man3/arb.3 (revision 353282) +++ head/share/man/man3/arb.3 (revision 353283) @@ -1,504 +1,512 @@ .\" $OpenBSD: tree.3,v 1.7 2002/06/12 01:09:20 provos Exp $ .\" .\" Copyright 2002 Niels Provos .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by Niels Provos. .\" 4. The name of the author may not be used to endorse or promote products .\" derived from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ .\" -.Dd September 28, 2019 +.Dd October 2, 2019 .Dt ARB 3 .Os .Sh NAME .Nm ARB_PROTOTYPE , .Nm ARB_PROTOTYPE_STATIC , .Nm ARB_PROTOTYPE_INSERT , .Nm ARB_PROTOTYPE_INSERT_COLOR , .Nm ARB_PROTOTYPE_REMOVE , .Nm ARB_PROTOTYPE_REMOVE_COLOR , .Nm ARB_PROTOTYPE_FIND , .Nm ARB_PROTOTYPE_NFIND , .Nm ARB_PROTOTYPE_NEXT , .Nm ARB_PROTOTYPE_PREV , .Nm ARB_PROTOTYPE_MINMAX , .Nm ARB_PROTOTYPE_REINSERT , .Nm ARB_GENERATE , .Nm ARB_GENERATE_STATIC , .Nm ARB_GENERATE_INSERT , .Nm ARB_GENERATE_INSERT_COLOR , .Nm ARB_GENERATE_REMOVE , .Nm ARB_GENERATE_REMOVE_COLOR , .Nm ARB_GENERATE_FIND , .Nm ARB_GENERATE_NFIND , .Nm ARB_GENERATE_NEXT , .Nm ARB_GENERATE_PREV , .Nm ARB_GENERATE_MINMAX , .Nm ARB_GENERATE_REINSERT , .Nm ARB8_ENTRY , .Nm ARB16_ENTRY , .Nm ARB32_ENTRY , .Nm ARB8_HEAD , .Nm ARB16_HEAD , .Nm ARB32_HEAD , .Nm ARB_ALLOCSIZE , .Nm ARB_INITIALIZER , .Nm ARB_ROOT , .Nm ARB_EMPTY , .Nm ARB_FULL , .Nm ARB_CURNODES , .Nm ARB_MAXNODES , .Nm ARB_NEXT , .Nm ARB_PREV , .Nm ARB_MIN , .Nm ARB_MAX , .Nm ARB_FIND , .Nm ARB_NFIND , .Nm ARB_LEFT , .Nm ARB_LEFTIDX , .Nm ARB_RIGHT , .Nm ARB_RIGHTIDX , .Nm ARB_PARENT , .Nm ARB_PARENTIDX , .Nm ARB_GETFREE , .Nm ARB_FREEIDX , .Nm ARB_FOREACH , .Nm ARB_FOREACH_FROM , .Nm ARB_FOREACH_SAFE , .Nm ARB_FOREACH_REVERSE , .Nm ARB_FOREACH_REVERSE_FROM , .Nm ARB_FOREACH_REVERSE_SAFE , .Nm ARB_INIT , .Nm ARB_INSERT , .Nm ARB_REMOVE , -.Nm ARB_REINSERT +.Nm ARB_REINSERT , +.Nm ARB_RESET_TREE .Nd "array-based red-black trees" .Sh SYNOPSIS .In sys/arb.h .Fn ARB_PROTOTYPE NAME TYPE FIELD CMP .Fn ARB_PROTOTYPE_STATIC NAME TYPE FIELD CMP .Fn ARB_PROTOTYPE_INSERT NAME TYPE ATTR .Fn ARB_PROTOTYPE_INSERT_COLOR NAME TYPE ATTR .Fn ARB_PROTOTYPE_REMOVE NAME TYPE ATTR .Fn ARB_PROTOTYPE_REMOVE_COLOR NAME TYPE ATTR .Fn ARB_PROTOTYPE_FIND NAME TYPE ATTR .Fn ARB_PROTOTYPE_NFIND NAME TYPE ATTR .Fn ARB_PROTOTYPE_NEXT NAME TYPE ATTR .Fn ARB_PROTOTYPE_PREV NAME TYPE ATTR .Fn ARB_PROTOTYPE_MINMAX NAME TYPE ATTR .Fn ARB_PROTOTYPE_REINSERT NAME TYPE ATTR .Fn ARB_GENERATE NAME TYPE FIELD CMP .Fn ARB_GENERATE_STATIC NAME TYPE FIELD CMP .Fn ARB_GENERATE_INSERT NAME TYPE FIELD CMP ATTR .Fn ARB_GENERATE_INSERT_COLOR NAME TYPE FIELD ATTR .Fn ARB_GENERATE_REMOVE NAME TYPE FIELD ATTR .Fn ARB_GENERATE_REMOVE_COLOR NAME TYPE FIELD ATTR .Fn ARB_GENERATE_FIND NAME TYPE FIELD CMP ATTR .Fn ARB_GENERATE_NFIND NAME TYPE FIELD CMP ATTR .Fn ARB_GENERATE_NEXT NAME TYPE FIELD ATTR .Fn ARB_GENERATE_PREV NAME TYPE FIELD ATTR .Fn ARB_GENERATE_MINMAX NAME TYPE FIELD ATTR .Fn ARB_GENERATE_REINSERT NAME TYPE FIELD CMP ATTR .Fn ARB<8|16|32>_ENTRY .Fn ARB<8|16|32>_HEAD HEADNAME TYPE .Ft "size_t" .Fn ARB_ALLOCSIZE "ARB_HEAD *head" "int<8|16|32>_t maxnodes" "struct TYPE *elm" .Fn ARB_INITIALIZER "ARB_HEAD *head" "int<8|16|32>_t maxnodes" .Ft "struct TYPE *" .Fn ARB_ROOT "ARB_HEAD *head" .Ft "bool" .Fn ARB_EMPTY "ARB_HEAD *head" .Ft "bool" .Fn ARB_FULL "ARB_HEAD *head" .Ft "int<8|16|32>_t" .Fn ARB_CURNODES "ARB_HEAD *head" .Ft "int<8|16|32>_t" .Fn ARB_MAXNODES "ARB_HEAD *head" .Ft "struct TYPE *" .Fn ARB_NEXT NAME "ARB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn ARB_PREV NAME "ARB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn ARB_MIN NAME "ARB_HEAD *head" .Ft "struct TYPE *" .Fn ARB_MAX NAME "ARB_HEAD *head" .Ft "struct TYPE *" .Fn ARB_FIND NAME "ARB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn ARB_NFIND NAME "ARB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn ARB_LEFT "struct TYPE *elm" "ARB_ENTRY NAME" .Ft "int<8|16|32>_t" .Fn ARB_LEFTIDX "struct TYPE *elm" "ARB_ENTRY NAME" .Ft "struct TYPE *" .Fn ARB_RIGHT "struct TYPE *elm" "ARB_ENTRY NAME" .Ft "int<8|16|32>_t" .Fn ARB_RIGHTIDX "struct TYPE *elm" "ARB_ENTRY NAME" .Ft "struct TYPE *" .Fn ARB_PARENT "struct TYPE *elm" "ARB_ENTRY NAME" .Ft "int<8|16|32>_t" .Fn ARB_PARENTIDX "struct TYPE *elm" "ARB_ENTRY NAME" .Ft "struct TYPE *" .Fn ARB_GETFREE "ARB_HEAD *head" "FIELD" .Ft "int<8|16|32>_t" .Fn ARB_FREEIDX "ARB_HEAD *head" .Fn ARB_FOREACH VARNAME NAME "ARB_HEAD *head" .Fn ARB_FOREACH_FROM "VARNAME" "NAME" "POS_VARNAME" .Fn ARB_FOREACH_SAFE "VARNAME" "NAME" "ARB_HEAD *head" "TEMP_VARNAME" .Fn ARB_FOREACH_REVERSE VARNAME NAME "ARB_HEAD *head" .Fn ARB_FOREACH_REVERSE_FROM "VARNAME" "NAME" "POS_VARNAME" .Fn ARB_FOREACH_REVERSE_SAFE "VARNAME" "NAME" "ARB_HEAD *head" "TEMP_VARNAME" .Ft void .Fn ARB_INIT "struct TYPE *elm" "FIELD" "ARB_HEAD *head" "int<8|16|32>_t maxnodes" .Ft "struct TYPE *" .Fn ARB_INSERT NAME "ARB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn ARB_REMOVE NAME "ARB_HEAD *head" "struct TYPE *elm" .Ft "struct TYPE *" .Fn ARB_REINSERT NAME "ARB_HEAD *head" "struct TYPE *elm" +.Ft void +.Fn ARB_RESET_TREE "ARB_HEAD *head" NAME "int<8|16|32>_t maxnodes" .Sh DESCRIPTION These macros define data structures for and array-based red-black trees. They use a single, continuous chunk of memory, and are useful e.g., when the tree needs to be transferred between userspace and kernel. .Pp In the macro definitions, .Fa TYPE is the name tag of a user defined structure that must contain a field of type .Vt ARB_ENTRY , named .Fa ENTRYNAME . The argument .Fa HEADNAME is the name tag of a user defined structure that must be declared using the .Fn ARB_HEAD macro. The argument .Fa NAME has to be a unique name prefix for every tree that is defined. .Pp The function prototypes are declared with .Fn ARB_PROTOTYPE , or .Fn ARB_PROTOTYPE_STATIC . The function bodies are generated with .Fn ARB_GENERATE , or .Fn ARB_GENERATE_STATIC . See the examples below for further explanation of how these macros are used. .Pp A red-black tree is a binary search tree with the node color as an extra attribute. It fulfills a set of conditions: .Bl -enum -offset indent .It Every search path from the root to a leaf consists of the same number of black nodes. .It Each red node (except for the root) has a black parent. .It Each leaf node is black. .El .Pp Every operation on a red-black tree is bounded as .Fn O "lg n" . The maximum height of a red-black tree is .Fn 2lg "n + 1" . .Pp .Fn ARB_* trees require entries to be allocated as an array, and uses array indices to link entries together. The maximum number of .Fn ARB_* tree entries is therefore constrained by the minimum of array size and choice of signed integer data type used to store array indices. Use .Fn ARB_ALLOCSIZE to compute the size of memory chunk to allocate. .Pp A red-black tree is headed by a structure defined by the .Fn ARB_HEAD macro. A structure is declared with either of the following: .Bd -ragged -offset indent .Fn ARB<8|16|32>_HEAD HEADNAME TYPE .Va head ; .Ed .Pp where .Fa HEADNAME is the name of the structure to be defined, and struct .Fa TYPE is the type of the elements to be inserted into the tree. .Pp The .Fn ARB_HEAD variant includes a suffix denoting the signed integer data type size .Pq in bits used to store array indices. For example, .Fn ARB_HEAD8 creates a red-black tree head strucutre with 8-bit signed array indices capable of indexing up to 128 entries. .Pp The .Fn ARB_ENTRY macro declares a structure that allows elements to be connected in the tree. Similarly to the .Fn ARB<8|16|32>_HEAD macro, the .Fn ARB_ENTRY variant includes a suffix denoting the signed integer data type size .Pq in bits used to store array indices. Entries should use the same number of bits as the tree head structure they will be linked into. .Pp In order to use the functions that manipulate the tree structure, their prototypes need to be declared with the .Fn ARB_PROTOTYPE or .Fn ARB_PROTOTYPE_STATIC macro, where .Fa NAME is a unique identifier for this particular tree. The .Fa TYPE argument is the type of the structure that is being managed by the tree. The .Fa FIELD argument is the name of the element defined by .Fn ARB_ENTRY . Individual prototypes can be declared with .Fn ARB_PROTOTYPE_INSERT , .Fn ARB_PROTOTYPE_INSERT_COLOR , .Fn ARB_PROTOTYPE_REMOVE , .Fn ARB_PROTOTYPE_REMOVE_COLOR , .Fn ARB_PROTOTYPE_FIND , .Fn ARB_PROTOTYPE_NFIND , .Fn ARB_PROTOTYPE_NEXT , .Fn ARB_PROTOTYPE_PREV , .Fn ARB_PROTOTYPE_MINMAX , and .Fn ARB_PROTOTYPE_REINSERT in case not all functions are required. The individual prototype macros expect .Fa NAME , .Fa TYPE , and .Fa ATTR arguments. The .Fa ATTR argument must be empty for global functions or .Fa static for static functions. .Pp The function bodies are generated with the .Fn ARB_GENERATE or .Fn ARB_GENERATE_STATIC macro. These macros take the same arguments as the .Fn ARB_PROTOTYPE and .Fn ARB_PROTOTYPE_STATIC macros, but should be used only once. As an alternative individual function bodies are generated with the .Fn ARB_GENERATE_INSERT , .Fn ARB_GENERATE_INSERT_COLOR , .Fn ARB_GENERATE_REMOVE , .Fn ARB_GENERATE_REMOVE_COLOR , .Fn ARB_GENERATE_FIND , .Fn ARB_GENERATE_NFIND , .Fn ARB_GENERATE_NEXT , .Fn ARB_GENERATE_PREV , .Fn ARB_GENERATE_MINMAX , and .Fn ARB_GENERATE_REINSERT macros. .Pp Finally, the .Fa CMP argument is the name of a function used to compare tree nodes with each other. The function takes two arguments of type .Vt "struct TYPE *" . If the first argument is smaller than the second, the function returns a value smaller than zero. If they are equal, the function returns zero. Otherwise, it should return a value greater than zero. The compare function defines the order of the tree elements. .Pp The .Fn ARB_INIT macro initializes the tree referenced by .Fa head , with the array length of .Fa maxnodes . .Pp The red-black tree can also be initialized statically by using the .Fn ARB_INITIALIZER macro: .Bd -ragged -offset indent .Fn ARB<8|16|32>_HEAD HEADNAME TYPE .Va head = .Fn ARB_INITIALIZER &head maxnodes ; .Ed .Pp The .Fn ARB_INSERT macro inserts the new element .Fa elm into the tree. .Pp The .Fn ARB_REMOVE macro removes the element .Fa elm from the tree pointed by .Fa head . .Pp The .Fn ARB_FIND and .Fn ARB_NFIND macros can be used to find a particular element in the tree. .Bd -literal -offset indent struct TYPE find, *res; find.key = 30; res = RB_FIND(NAME, head, &find); .Ed .Pp The .Fn ARB_ROOT , .Fn ARB_MIN , .Fn ARB_MAX , .Fn ARB_NEXT , and .Fn ARB_PREV macros can be used to traverse the tree: .Pp .Dl "for (np = RB_MIN(NAME, &head); np != NULL; np = RB_NEXT(NAME, &head, np))" .Pp Or, for simplicity, one can use the .Fn ARB_FOREACH or .Fn ARB_FOREACH_REVERSE macro: .Bd -ragged -offset indent .Fn RB_FOREACH np NAME head .Ed .Pp The macros .Fn ARB_FOREACH_SAFE and .Fn ARB_FOREACH_REVERSE_SAFE traverse the tree referenced by head in a forward or reverse direction respectively, assigning each element in turn to np. However, unlike their unsafe counterparts, they permit both the removal of np as well as freeing it from within the loop safely without interfering with the traversal. .Pp Both .Fn ARB_FOREACH_FROM and .Fn ARB_FOREACH_REVERSE_FROM may be used to continue an interrupted traversal in a forward or reverse direction respectively. The head pointer is not required. The pointer to the node from where to resume the traversal should be passed as their last argument, and will be overwritten to provide safe traversal. .Pp The .Fn ARB_EMPTY macro should be used to check whether a red-black tree is empty. .Pp Given that ARB trees have an intrinsic upper bound on the number of entries, some ARB-specific additional macros are defined. The .Fn ARB_FULL macro returns a boolean indicating whether the current number of tree entries equals the tree's maximum. The .Fn ARB_CURNODES and .Fn ARB_MAXNODES macros return the current and maximum number of entries respectively. The .Fn ARB_GETFREE macro returns a pointer to the next free entry in the array of entries, ready to be linked into the tree. The .Fn ARB_INSERT returns .Dv NULL if the element was inserted in the tree successfully, otherwise they return a pointer to the element with the colliding key. .Pp Accordingly, .Fn ARB_REMOVE returns the pointer to the removed element otherwise they return .Dv NULL to indicate an error. .Pp The -.Fn RB_REINSERT +.Fn ARB_REINSERT macro updates the position of the element .Fa elm in the tree. This must be called if a member of a .Nm tree is modified in a way that affects comparison, such as by modifying a node's key. This is a lower overhead alternative to removing the element and reinserting it again. +.Pp +The +.Fn ARB_RESET_TREE +macro discards the tree topology. +It does not modify embedded object values or the free list. .Sh SEE ALSO .Xr queue 3 , .Xr tree 3 .Sh HISTORY The .Nm ARB macros first appeared in .Fx 13.0 . .Sh AUTHORS The .Nm ARB macros were implemented by .An Lawrence Stewart Aq Mt lstewart@FreeBSD.org , based on .Xr tree 3 macros written by .An Niels Provos . Index: head/share/man/man3/stats.3 =================================================================== --- head/share/man/man3/stats.3 (nonexistent) +++ head/share/man/man3/stats.3 (revision 353283) @@ -0,0 +1,962 @@ +.\" +.\" Copyright (c) 2016-2018 Netflix, Inc. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification, immediately at the beginning of the file. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 7, 2019 +.Dt STATS 3 +.Os +.Sh NAME +.Nm stats +.Nd statistics gathering +.Sh LIBRARY +.Lb libstats +.Sh SYNOPSIS +.In sys/arb.h +.In sys/qmath.h +.In sys/stats.h +.Ss Stats Blob Template Management Functions +.Ft int +.Fo stats_tpl_alloc +.Fa "const char *name" +.Fa "uint32_t flags" +.Fc +.Ft int +.Fo stats_tpl_fetch_allocid +.Fa "const char *name" +.Fa "uint32_t hash" +.Fc +.Ft int +.Fo stats_tpl_fetch +.Fa "int tpl_id" +.Fa "struct statsblob_tpl **tpl" +.Fc +.Ft int +.Fo stats_tpl_id2name +.Fa "uint32_t tpl_id" +.Fa "char *buf" +.Fa "size_t len" +.Fc +.Ft int +.Fo stats_tpl_sample_rates +.Fa "SYSCTL_HANDLER_ARGS" +.Fc +.Ft int +.Fo stats_tpl_sample_rollthedice +.Fa "struct stats_tpl_sample_rate *rates" +.Fa "int nrates" +.Fa "void *seed_bytes" +.Fa "size_t seed_len" +.Fc +.Ft struct voistatspec +.Fo STATS_VSS_SUM +.Fc +.Ft struct voistatspec +.Fo STATS_VSS_MAX +.Fc +.Ft struct voistatspec +.Fo STATS_VSS_MIN +.Fc +.Ft struct voistatspec +.Fo STATS_VSS_CRHIST<32|64>_LIN +.Fa "lb" +.Fa "ub" +.Fa "stepinc" +.Fa "vsdflags" +.Fc +.Ft struct voistatspec +.Fo STATS_VSS_CRHIST<32|64>_EXP +.Fa "lb" +.Fa "ub" +.Fa "stepbase" +.Fa "stepexp" +.Fa "vsdflags" +.Fc +.Ft struct voistatspec +.Fo "STATS_VSS_CRHIST<32|64>_LINEXP" +.Fa "lb" +.Fa "ub" +.Fa "nlinsteps" +.Fa "stepbase" +.Fa "vsdflags" +.Fc +.Ft struct voistatspec +.Fo "STATS_VSS_CRHIST<32|64>_USR" +.Fa Sy "HBKTS" Ns Pq Sy "CRBKT" Ns ( Em "lb" ) , "..." Pc , +.Fa "vsdflags" +.Fc +.Ft struct voistatspec +.Fo "STATS_VSS_DRHIST<32|64>_USR" +.Fa Sy "HBKTS" Ns Pq Sy "DRBKT" Ns ( Em "lb" , "ub" ) , "..." Pc , +.Fa "vsdflags" +.Fc +.Ft struct voistatspec +.Fo "STATS_VSS_DVHIST<32|64>_USR" +.Fa Sy "HBKTS" Ns Pq Sy "DVBKT" Ns ( Em "val" ) , "..." Pc , +.Fa "vsdflags" +.Fc +.Ft struct voistatspec +.Fo STATS_VSS_TDGSTCLUST<32|64> +.Fa "nctroids" +.Fa "prec" +.Fc +.Ft int +.Fo stats_tpl_add_voistats +.Fa "uint32_t tpl_id" +.Fa "int32_t voi_id" +.Fa "const char *voi_name" +.Fa "enum vsd_dtype voi_dtype" +.Fa "uint32_t nvss" +.Fa "struct voistatspec *vss" +.Fa "uint32_t flags" +.Fc +.Ss Stats Blob Data Gathering Functions +.Ft int +.Fo stats_voi_update__ +.Fa "struct statsblob *sb" +.Fa "int32_t voi_id" +.Fa " voival" +.Fc +.Ss Stats Blob Utility Functions +.Ft struct statsblob * +.Fo stats_blob_alloc +.Fa "uint32_t tpl_id" +.Fa "uint32_t flags" +.Fc +.Ft int +.Fo stats_blob_init +.Fa "struct statsblob *sb" +.Fa "uint32_t tpl_id" +.Fa "uint32_t flags" +.Fc +.Ft int +.Fo stats_blob_clone +.Fa "struct statsblob **dst" +.Fa "size_t dstmaxsz" +.Fa "struct statsblob *src" +.Fa "uint32_t flags" +.Fc +.Ft void +.Fo stats_blob_destroy +.Fa "struct statsblob *sb" +.Fc +.Ft int +.Fo stats_voistat_fetch_dptr +.Fa "struct statsblob *sb" +.Fa "int32_t voi_id" +.Fa "enum voi_stype stype" +.Fa "enum vsd_dtype *retdtype" +.Fa "struct voistatdata **retvsd" +.Fa "size_t *retvsdsz" +.Fc +.Ft int +.Fo stats_voistat_fetch_ +.Fa "struct statsblob *sb" +.Fa "int32_t voi_id" +.Fa "enum voi_stype stype" +.Fa " *ret" +.Fc +.Ft int +.Fo stats_blob_snapshot +.Fa "struct statsblob **dst" +.Fa "size_t dstmaxsz" +.Fa "struct statsblob *src" +.Fa "uint32_t flags" +.Fc +.Ft int +.Fo stats_blob_tostr +.Fa "struct statsblob *sb" +.Fa "struct sbuf *buf" +.Fa "enum sb_str_fmt fmt" +.Fa "uint32_t flags" +.Fc +.Ft int +.Fo stats_voistatdata_tostr +.Fa "const struct voistatdata *vsd" +.Fa "enum vsd_dtype dtype" +.Fa "enum sb_str_fmt fmt" +.Fa "struct sbuf *buf" +.Fa "int objdump" +.Fc +.Ft typedef int +.Fn "\*(lp*stats_blob_visitcb_t\*(rp" "struct sb_visit *sbv" "void *usrctx" +.Ft int +.Fo stats_blob_visit +.Fa "struct statsblob *sb" +.Fa "stats_blob_visitcb_t func" +.Fa "void *usrctx" +.Fc +.Sh DESCRIPTION +The +.Nm +framework facilitates real-time kernel and user space statistics gathering. +The framework is built around the +.Dq statsblob , +an object embedded within a contiguous memory allocation that is mostly opaque +to consumers and stores all required state. +A +.Dq statsblob +object can itself be embedded within other objects either directly or indirectly +using a pointer. +.Pp +Objects or subsystems for which statistics are to be gathered are initialized +from a template +.Dq statsblob , +which acts as the blueprint for an arbitrary set of +Variables Of Interest (VOIs) and their associated statistics. +Each template defines a schema plus associated metadata, which are kept separate +to minimize the memory footprint of blobs. +.Pp +Data gathering hook functions added at appropriate locations within the code +base of interest feed VOI data into the framework for processing. +.Pp +Each +.Dq statsblob , +consists of a +.Vt struct statsblob +header and opaque internal blob structure per the following diagram: +.Bd -literal -offset indent +--------------------------------------------------------- +| struct | uint8_t | +| statsblob | opaque[] | +--------------------------------------------------------- +.Ed +.Pp +The publicly visible 8-byte header is defined as: +.Bd -literal -offset indent +struct statsblob { + uint8_t abi; + uint8_t endian; + uint16_t flags; + uint16_t maxsz; + uint16_t cursz; + uint8_t opaque[]; +}; +.Ed +.Pp +.Va abi +specifies which API version the blob's +.Va opaque +internals conform to +.Pq Dv STATS_ABI_V1 is the only version currently defined . +.Va endian +specifies the endianness of the blob's fields +.Po +.Dv SB_LE +for little endian, +.Dv SB_BE +for big endian, or +.Dv SB_UE +for unknown endianness +.Pc . +.Va cursz +specifies the size of the blob, while +.Va maxsz +specifies the size of the underlying memory allocation in which the +blob is embedded. +Both +.Va cursz +and +.Va maxsz +default to units of bytes, unless a flag is set in +.Va flags +that dictates otherwise. +.Pp +Templates are constructed by associating arbitrary VOI IDs with a set of +statistics, where each statistic is specified using a +.Vt struct voistatspec +per the definition below: +.Bd -literal -offset indent +struct voistatspec { + vss_hlpr_fn hlpr; + struct vss_hlpr_info *hlprinfo; + struct voistatdata *iv; + size_t vsdsz; + uint32_t flags; + enum vsd_dtype vs_dtype : 8; + enum voi_stype stype : 8; +}; +.Ed +.Pp +It is generally expected that consumers will not work with +.Vt struct voistatspec +directly, and instead use the +.Fn STATS_VSS_* +helper macros. +.Pp +The +.Nm +framework offers the following statistics for association with VOIs: +.Bl -tag -width ".Dv VS_STYPE_TDGST" +.It Dv VS_STYPE_SUM +The sum of VOI values. +.It Dv VS_STYPE_MAX +The maximum VOI value. +.It Dv VS_STYPE_MIN +The minimum VOI value. +.It Dv VS_STYPE_HIST +A static bucket histogram of VOI values, including a count of +.Dq out-of-band/bucket Dc +values which did not match any bucket. +Histograms can be specified as +.Dq Em C Ns ontinuous Em R Ns ange Dc +.Pq CRHIST Pc , +.Dq Em D Ns iscrete Em R Ns ange Dc +.Pq DRHIST Pc +or +.Dq Em D Ns iscrete Em V Ns alue Dc +.Pq DVHIST Pc , +with 32 or 64 bit bucket counters, depending on the VOI semantics. +.It Dv VS_STYPE_TDGST +A dynamic bucket histogram of VOI values based on the t-digest method +.Po refer to the t-digest paper in the +.Sx SEE ALSO +section below +.Pc . +.El +.Pp +A +.Dq visitor software design pattern Ns +-like scheme is employed to facilitate iterating over a blob's data without +concern for the blob's structure. +The data provided to visitor callback functions is encapsulated in +.Vt struct sb_visit +per the definition below: +.Bd -literal -offset indent +struct sb_visit { + struct voistatdata *vs_data; + uint32_t tplhash; + uint32_t flags; + int16_t voi_id; + int16_t vs_dsz; + enum vsd_dtype voi_dtype : 8; + enum vsd_dtype vs_dtype : 8; + int8_t vs_stype; + uint16_t vs_errs; +}; +.Ed +.Pp +The +.Fn stats_tpl_sample_rates +and +.Fn stats_tpl_sample_rollthedice +functions utilize +.Vt struct stats_tpl_sample_rate +to encapsulate per-template sample rate information per the definition below: +.Bd -literal -offset indent +struct stats_tpl_sample_rate { + int32_t tpl_slot_id; + uint32_t tpl_sample_pct; +}; +.Ed +.Pp +The +.Va tpl_slot_id +member holds the template's slot ID obtained from +.Fn stats_tpl_alloc +or +.Fn stats_tpl_fetch_allocid . +The +.Va tpl_sample_pct +member holds the template's sample rate as an integer percentage in the range +[0,100]. +.Pp +The +.Vt stats_tpl_sr_cb_t +conformant function pointer that is required as the +.Fa arg1 +of +.Fn stats_tpl_sample_rates +is defined as: +.Bd -literal -offset indent +enum stats_tpl_sr_cb_action { + TPL_SR_UNLOCKED_GET, + TPL_SR_RLOCKED_GET, + TPL_SR_RUNLOCK, + TPL_SR_PUT +}; +typedef int (*stats_tpl_sr_cb_t)(enum stats_tpl_sr_cb_action action, + struct stats_tpl_sample_rate **rates, int *nrates, void *ctx); +.Ed +.Pp +It is required that a conformant function: +.Bl -dash +.It +Return an appropriate +.Xr errno 2 +on error, otherwise 0. +.It +When called with +.Qq action == TPL_SR_*_GET , +return the subsystem's rates list ptr and count, locked or unlocked as +requested. +.It +When called with +.Qq action == TPL_SR_RUNLOCK , +unlock the subsystem's rates list ptr and count. +Pair with a prior +.Qq action == TPL_SR_RLOCKED_GET +call. +.It +When called with +.Qq action == TPL_SR_PUT , +update the subsystem's rates list ptr and count to the sysctl processed values +and return the inactive list details in +.Fa rates +and +.Fa nrates +for garbage collection by +.Fn stats_tpl_sample_rates . +.El +.Pp +Where templates need to be referenced via textual means, for example via a MIB +variable, the following string based template spec formats can be used: +.Bl -enum +.It +.Qq Qc Ns +: +.Ns , for example +.Qq TCP_DEFAULT Qc Ns +:1731235399 +.It +.Qq Qc +.Ns , for example +.Qq TCP_DEFAULT Qc +.It +: +.Ns , for example +:1731235399 +.El +.Pp +The first form is the normative spec format generated by the framework, while +the second and third forms are convenience formats primarily for user input. +The use of inverted commas around the template name is optional. +.Ss MIB Variables +The in-kernel +.Nm +framework exposes the following framework-specific variables in the +.Va kern.stats +branch of the +.Xr sysctl 3 +MIB. +.Bl -tag -width "templates" +.It templates +Read-only CSV list of registered templates in normative template spec form. +.El +.Ss Template Management Functions +The +.Fn stats_tpl_alloc +function allocates a new template with the specified unique name and returns its +runtime-stable template slot ID for use with other API functions. +The +.Fa flags +argument is currently unused. +.Pp +The +.Fn stats_tpl_fetch_allocid +function returns the runtime-stable template slot ID of any registered template +matching the specified name and hash. +.Pp +The +.Fn stats_tpl_fetch +function returns the pointer to the registered template object at the specified +template slot ID. +.Pp +The +.Fn stats_tpl_id2name +function returns the name of the registered template object at the specified +template slot ID. +.Pp +The +.Fn stats_tpl_sample_rates +function provides a generic handler for template sample rates management and +reporting via +.Xr sysctl 3 +MIB variables. +Subsystems can use this function to create a subsystem-specific +.Xr SYSCTL_PROC 9 +MIB variable that manages and reports subsystem-specific template sampling +rates. +Subsystems must supply a +.Vt stats_tpl_sr_cb_t +conformant function pointer as the sysctl's +.Fa arg1 , +which is a callback used to interact with the subsystem's stats template sample +rates list. +Subsystems can optionally specify the sysctl's +.Fa arg2 +as non-zero, which causes a zero-initialized allocation of arg2-sized contextual +memory to be heap-allocated and passed in to all subsystem callbacks made during +the operation of +.Fn stats_tpl_sample_rates . +.Pp +The +.Fn stats_tpl_sample_rollthedice +function makes a weighted random template selection from the supplied array of +template sampling rates. +The cumulative percentage of all sampling rates should not exceed 100. +If no seed is supplied, a PRNG is used to generate a true random number so that +every selection is independent. +If a seed is supplied, selection will be made randomly across different seeds, but +deterministically given the same seed. +.Pp +The +.Fn stats_tpl_add_voistats +function is used to add a VOI and associated set of statistics to the registered +template object at the specified template slot ID. +The set of statistics is passed as an array of +.Vt struct voistatspec +which can be initialized using the +.Fn STATS_VSS_* +helper macros or manually for non-standard use cases. +For static +.Fa vss +arrays, the +.Fa nvss +count of array elements can be determined by passing +.Fa vss +to the +.Fn NVSS +macro. +The +.Dv SB_VOI_RELUPDATE +flag can be passed to configure the VOI for use with +.Fn stats_voi_update_rel_ , +which entails maintaining an extra 8 bytes of state in the blob at each update. +.Ss Data Gathering Functions +The +.Fn stats_voi_update_abs_ +and +.Fn stats_voi_update_rel_ +functions both update all the statistics associated with the VOI identified by +.Fa voi_id . +The +.Dq abs +call uses +.Fa voival +as an absolute value, whereas the +.Dq rel +call uses +.Fa voival +as a value relative to that of the previous update function call, by adding it +to the previous value and using the result for the update. +Relative updates are only possible for VOIs that were added to the template with +the +.Dv SB_VOI_RELUPDATE +flag specified to +.Fn stats_tpl_add_voistats . +.Ss Utility Functions +The +.Fn stats_blob_alloc +function allocates and initializes a new blob based on the registered template +object at the specified template slot ID. +.Pp +The +.Fn stats_blob_init +function initializes a new blob in an existing memory allocation based on the +registered template object at the specified template slot ID. +.Pp +The +.Fn stats_blob_clone +function duplicates the +.Fa src +blob into +.Fa dst , +leaving only the +.Va maxsz +field of +.Fa dst +untouched. +The +.Dv SB_CLONE_ALLOCDST +flag can be passed to instruct the function to allocate a new blob of +appropriate size into which to clone +.Fa src , +storing the new pointer in +.Fa *dst . +The +.Dv SB_CLONE_USRDSTNOFAULT +or +.Dv SB_CLONE_USRDST +flags can be set to respectively signal that +.Xr copyout_nofault 9 +or +.Xr copyout 9 +should be used because +.Fa *dst +is a user space address. +.Pp +The +.Fn stats_blob_snapshot +function calls +.Fn stats_blob_clone +to obtain a copy of +.Fa src +and then performs any additional functions required to produce a coherent +blob snapshot. +The flags interpreted by +.Fn stats_blob_clone +also apply to +.Fn stats_blob_snapshot . +Additionally, the +.Dv SB_CLONE_RSTSRC +flag can be used to effect a reset of the +.Fa src +blob's statistics after a snapshot is successfully taken. +.Pp +The +.Fn stats_blob_destroy +function destroys a blob previously created with +.Fn stats_blob_alloc , +.Fn stats_blob_clone +or +.Fn stats_blob_snapshot . +.Pp +The +.Fn stats_blob_visit +function allows the caller to iterate over the contents of a blob. +The callback function +.Fa func +is called for every VOI and statistic in the blob, passing a +.Vt struct sb_visit +and the user context argument +.Fa usrctx +to the callback function. +The +.Fa sbv +passed to the callback function may have one or more of the following flags set +in the +.Va flags +struct member to provide useful metadata about the iteration: +.Dv SB_IT_FIRST_CB , +.Dv SB_IT_LAST_CB , +.Dv SB_IT_FIRST_VOI , +.Dv SB_IT_LAST_VOI , +.Dv SB_IT_FIRST_VOISTAT , +.Dv SB_IT_LAST_VOISTAT , +.Dv SB_IT_NULLVOI +and +.Dv SB_IT_NULLVOISTAT . +Returning a non-zero value from the callback function terminates the iteration. +.Pp +The +.Fn stats_blob_tostr +renders a string representation of a blob into the +.Xr sbuf 9 +.Fa buf . +Currently supported render formats are +.Dv SB_STRFMT_FREEFORM +and +.Dv SB_STRFMT_JSON . +The +.Dv SB_TOSTR_OBJDUMP +flag can be passed to render version specific opaque implementation detail for +debugging or string-to-binary blob reconstruction purposes. +The +.Dv SB_TOSTR_META +flag can be passed to render template metadata into the string representation, +using the blob's template hash to lookup the corresponding template. +.Pp +The +.Fn stats_voistatdata_tostr +renders a string representation of an individual statistic's data into the +.Xr sbuf 9 +.Fa buf . +The same render formats supported by the +.Fn stats_blob_tostr +function can be specified, and the +.Fa objdump +boolean has the same meaning as the +.Dv SB_TOSTR_OBJDUMP +flag. +.Pp +The +.Fn stats_voistat_fetch_dptr +function returns an internal blob pointer to the specified +.Fa stype +statistic data for the VOI +.Fa voi_id . +The +.Fn stats_voistat_fetch_ +functions are convenience wrappers around +.Fn stats_voistat_fetch_dptr +to perform the extraction for simple data types. +.Sh IMPLEMENTATION NOTES +The following notes apply to STATS_ABI_V1 format statsblobs. +.Ss Space-Time Complexity +Blobs are laid out as three distinct memory regions following the header: +.Bd -literal -offset indent +------------------------------------------------------ +| struct | struct | struct | struct | +| statsblobv1 | voi [] | voistat [] | voistatdata [] | +------------------------------------------------------ +.Ed +.Pp +Blobs store VOI and statistic blob state +.Po +8 bytes for +.Vt struct voi +and 8 bytes for +.Vt struct voistat +respectively +.Pc +in sparse arrays, using the +.Fa voi_id +and +.Vt enum voi_stype +as array indices. +This allows O(1) access to any voi/voistat pair in the blob, at the expense of +8 bytes of wasted memory per vacant slot for templates which do not specify +contiguously numbered VOIs and/or statistic types. +Data storage for statistics is only allocated for non-vacant slot pairs. +.Pp +To provide a concrete example, a blob with the following specification: +.Bl -dash +.It +Two VOIs; ID 0 and 2; added to the template in that order +.It +VOI 0 is of data type +.Vt int64_t , +is configured with +.Dv SB_VOI_RELUPDATE +to enable support for relative updates using +.Fn stats_voi_update_rel_ , +and has a +.Dv VS_STYPE_MIN +statistic associated with it. +.It +VOI 2 is of data type +.Vt uint32_t +with +.Dv VS_STYPE_SUM +and +.Dv VS_STYPE_MAX +statistics associated with it. +.El +.Pp +would have the following memory layout: +.Bd -literal +-------------------------------------- +| header | struct statsblobv1, 32 bytes +|------------------------------------| +| voi[0] | struct voi, 8 bytes +| voi[1] (vacant) | struct voi, 8 bytes +| voi[2] | struct voi, 8 bytes +|------------------------------------| +| voi[2]voistat[VOISTATE] (vacant) | struct voistat, 8 bytes +| voi[2]voistat[SUM] | struct voistat, 8 bytes +| voi[2]voistat[MAX] | struct voistat, 8 bytes +| voi[0]voistat[VOISTATE] | struct voistat, 8 bytes +| voi[0]voistat[SUM] (vacant) | struct voistat, 8 bytes +| voi[0]voistat[MAX] (vacant) | struct voistat, 8 bytes +| voi[0]voistat[MIN] | struct voistat, 8 bytes +|------------------------------------| +| voi[2]voistat[SUM]voistatdata | struct voistatdata_int32, 4 bytes +| voi[2]voistat[MAX]voistatdata | struct voistatdata_int32, 4 bytes +| voi[0]voistat[VOISTATE]voistatdata | struct voistatdata_numeric, 8 bytes +| voi[0]voistat[MIN]voistatdata | struct voistatdata_int64, 8 bytes +-------------------------------------- + TOTAL 136 bytes +.Ed +.Pp +When rendered to string format using +.Fn stats_blob_tostr , +the +.Dv SB_STRFMT_FREEFORM +.Fa fmt +and the +.Dv SB_TOSTR_OBJDUMP +flag, the rendered output is: +.Bd -literal +struct statsblobv1@0x8016250a0, abi=1, endian=1, maxsz=136, cursz=136, \\ + created=6294158585626144, lastrst=6294158585626144, flags=0x0000, \\ + stats_off=56, statsdata_off=112, tplhash=2994056564 + vois[0]: id=0, name="", flags=0x0001, dtype=INT_S64, voistatmaxid=3, \\ + stats_off=80 + vois[0]stat[0]: stype=VOISTATE, flags=0x0000, dtype=VOISTATE, \\ + dsz=8, data_off=120 + voistatdata: prev=0 + vois[0]stat[1]: stype=-1 + vois[0]stat[2]: stype=-1 + vois[0]stat[3]: stype=MIN, flags=0x0000, dtype=INT_S64, \\ + dsz=8, data_off=128 + voistatdata: 9223372036854775807 + vois[1]: id=-1 + vois[2]: id=2, name="", flags=0x0000, dtype=INT_U32, voistatmaxid=2, \\ + stats_off=56 + vois[2]stat[0]: stype=-1 + vois[2]stat[1]: stype=SUM, flags=0x0000, dtype=INT_U32, dsz=4, \\ + data_off=112 + voistatdata: 0 + vois[2]stat[2]: stype=MAX, flags=0x0000, dtype=INT_U32, dsz=4, \\ + data_off=116 + voistatdata: 0 +.Ed +.Pp +Note: The +.Qq \e +present in the rendered output above indicates a manual line break inserted to +keep the man page within 80 columns and is not part of the actual output. +.Ss Locking +The +.Nm +framework does not provide any concurrency protection at the individual blob +level, instead requiring that consumers guarantee mutual exclusion when calling +API functions that reference a non-template blob. +.Pp +The list of templates is protected with a +.Xr rwlock 9 +in-kernel, and +.Xr pthread 3 +rw lock in user space to support concurrency between template management and +blob initialization operations. +.Sh RETURN VALUES +.Fn stats_tpl_alloc +returns a runtime-stable template slot ID on success, or a negative errno on +failure. +-EINVAL is returned if any problems are detected with the arguments. +-EEXIST is returned if an existing template is registered with the same name. +-ENOMEM is returned if a required memory allocation fails. +.Pp +.Fn stats_tpl_fetch_allocid +returns a runtime-stable template slot ID, or negative errno on failure. +-ESRCH is returned if no registered template matches the specified name and/or +hash. +.Pp +.Fn stats_tpl_fetch +returns 0 on success, or ENOENT if an invalid +.Fa tpl_id +is specified. +.Pp +.Fn stats_tpl_id2name +returns 0 on success, or an errno on failure. +EOVERFLOW is returned if the length of +.Fa buf +specified by +.Fa len +is too short to hold the template's name. +ENOENT is returned if an invalid +.Fa tpl_id +is specified. +.Pp +.Fn stats_tpl_sample_rollthedice +returns a valid template slot id selected from +.Fa rates +or -1 if a NULL selection was made, that is no stats collection this roll. +.Pp +.Fn stats_tpl_add_voistats +return 0 on success, or an errno on failure. +EINVAL is returned if any problems are detected with the arguments. +EFBIG is returned if the resulting blob would have exceeded the maximum size. +EOPNOTSUPP is returned if an attempt is made to add more VOI stats to a +previously configured VOI. +ENOMEM is returned if a required memory allocation fails. +.Pp +.Fn stats_voi_update_abs_ +and +.Fn stats_voi_update_rel_ +return 0 on success, or EINVAL if any problems are detected with the arguments. +.Pp +.Fn stats_blob_init +returns 0 on success, or an errno on failure. +EINVAL is returned if any problems are detected with the arguments. +EOVERFLOW is returned if the template blob's +.Fa cursz +is larger than the +.Fa maxsz +of the blob being initialized. +.Pp +.Fn stats_blob_alloc +returns a pointer to a newly allocated and initialized blob based on the +specified template with slot ID +.Fa tpl_id , +or NULL if the memory allocation failed. +.Pp +.Fn stats_blob_clone +and +.Fn stats_blob_snapshot +return 0 on success, or an errno on failure. +EINVAL is returned if any problems are detected with the arguments. +ENOMEM is returned if the SB_CLONE_ALLOCDST flag was specified and the memory +allocation for +.Fa dst +fails. +EOVERFLOW is returned if the src blob's +.Fa cursz +is larger than the +.Fa maxsz +of the +.Fa dst +blob. +.Pp +.Fn stats_blob_visit +returns 0 on success, or EINVAL if any problems are detected with the arguments. +.Pp +.Fn stats_blob_tostr +and +.Fn stats_voistatdata_tostr +return 0 on success, or an errno on failure. +EINVAL is returned if any problems are detected with the arguments, otherwise +any error returned by +.Fn sbuf_error +for +.Fa buf +is returned. +.Pp +.Fn stats_voistat_fetch_dptr +returns 0 on success, or EINVAL if any problems are detected with the arguments. +.Pp +.Fn stats_voistat_fetch_ +returns 0 on success, or an errno on failure. +EINVAL is returned if any problems are detected with the arguments. +EFTYPE is returned if the requested data type does not match the blob's data +type for the specified +.Fa voi_id +and +.Fa stype . +.Sh SEE ALSO +.Xr errno 2 , +.Xr arb 3 , +.Xr qmath 3 , +.Xr tcp 4 , +.Xr sbuf 9 +.Rs +.%A "Ted Dunning" +.%A "Otmar Ertl" +.%T "Computing Extremely Accurate Quantiles Using t-digests" +.%U "https://github.com/tdunning/t-digest/raw/master/docs/t-digest-paper/histo.pdf" +.Re +.Sh HISTORY +The +.Nm +framework first appeared in +.Fx 13.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +framework and this manual page were written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org +and sponsored by Netflix, Inc. Property changes on: head/share/man/man3/stats.3 ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/share/mk/bsd.libnames.mk =================================================================== --- head/share/mk/bsd.libnames.mk (revision 353282) +++ head/share/mk/bsd.libnames.mk (revision 353283) @@ -1,214 +1,215 @@ # $FreeBSD$ # The include file define library names. # Other include files (e.g. bsd.prog.mk, bsd.lib.mk) include this # file where necessary. .if !target(____) .error bsd.libnames.mk cannot be included directly. .endif LIBDESTDIR= ${SYSROOT:U${DESTDIR}} .sinclude # Src directory locations are also defined in src.libnames.mk. LIBCRT0?= ${LIBDESTDIR}${LIBDIR_BASE}/crt0.o LIB80211?= ${LIBDESTDIR}${LIBDIR_BASE}/lib80211.a LIBALIAS?= ${LIBDESTDIR}${LIBDIR_BASE}/libalias.a LIBARCHIVE?= ${LIBDESTDIR}${LIBDIR_BASE}/libarchive.a LIBASN1?= ${LIBDESTDIR}${LIBDIR_BASE}/libasn1.a LIBATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libatm.a LIBAUDITD?= ${LIBDESTDIR}${LIBDIR_BASE}/libauditd.a LIBAVL?= ${LIBDESTDIR}${LIBDIR_BASE}/libavl.a LIBBE?= ${LIBDESTDIR}${LIBDIR_BASE}/libbe.a LIBBEGEMOT?= ${LIBDESTDIR}${LIBDIR_BASE}/libbegemot.a LIBBLACKLIST?= ${LIBDESTDIR}${LIBDIR_BASE}/libblacklist.a LIBBLUETOOTH?= ${LIBDESTDIR}${LIBDIR_BASE}/libbluetooth.a LIBBSDXML?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsdxml.a LIBBSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsm.a LIBBSNMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libbsnmp.a LIBBZ2?= ${LIBDESTDIR}${LIBDIR_BASE}/libbz2.a LIBC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc.a LIBCALENDAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcalendar.a LIBCAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libcam.a LIBCOMPAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcompat.a LIBCOMPILER_RT?=${LIBDESTDIR}${LIBDIR_BASE}/libcompiler_rt.a LIBCOM_ERR?= ${LIBDESTDIR}${LIBDIR_BASE}/libcom_err.a LIBCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libc++.a LIBCRYPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypt.a LIBCRYPTO?= ${LIBDESTDIR}${LIBDIR_BASE}/libcrypto.a LIBCTF?= ${LIBDESTDIR}${LIBDIR_BASE}/libctf.a LIBCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libcurses.a LIBCUSE?= ${LIBDESTDIR}${LIBDIR_BASE}/libcuse.a LIBCXGB4?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxgb4.a LIBCXXRT?= ${LIBDESTDIR}${LIBDIR_BASE}/libcxxrt.a LIBC_PIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libc_pic.a LIBDEVCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevctl.a LIBDEVDCTL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevdctl.a LIBDEVINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevinfo.a LIBDEVSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libdevstat.a LIBDIALOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libdialog.a LIBDL?= ${LIBDESTDIR}${LIBDIR_BASE}/libdl.a LIBDNS?= ${LIBDESTDIR}${LIBDIR_BASE}/libdns.a LIBDPV?= ${LIBDESTDIR}${LIBDIR_BASE}/libdpv.a LIBDTRACE?= ${LIBDESTDIR}${LIBDIR_BASE}/libdtrace.a LIBDWARF?= ${LIBDESTDIR}${LIBDIR_BASE}/libdwarf.a LIBEDIT?= ${LIBDESTDIR}${LIBDIR_BASE}/libedit.a LIBEFIVAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libefivar.a LIBELF?= ${LIBDESTDIR}${LIBDIR_BASE}/libelf.a LIBEXECINFO?= ${LIBDESTDIR}${LIBDIR_BASE}/libexecinfo.a LIBFETCH?= ${LIBDESTDIR}${LIBDIR_BASE}/libfetch.a LIBFIGPAR?= ${LIBDESTDIR}${LIBDIR_BASE}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" LIBFORM?= ${LIBDESTDIR}${LIBDIR_BASE}/libform.a LIBG2C?= ${LIBDESTDIR}${LIBDIR_BASE}/libg2c.a LIBGEOM?= ${LIBDESTDIR}${LIBDIR_BASE}/libgeom.a LIBGNUREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libgnuregex.a LIBGPIO?= ${LIBDESTDIR}${LIBDIR_BASE}/libgpio.a LIBGSSAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi.a LIBGSSAPI_KRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a LIBHDB?= ${LIBDESTDIR}${LIBDIR_BASE}/libhdb.a LIBHEIMBASE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimbase.a LIBHEIMNTLM?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimntlm.a LIBHEIMSQLITE?= ${LIBDESTDIR}${LIBDIR_BASE}/libheimsqlite.a LIBHX509?= ${LIBDESTDIR}${LIBDIR_BASE}/libhx509.a LIBIBCM?= ${LIBDESTDIR}${LIBDIR_BASE}/libibcm.a LIBIBMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibmad.a LIBIBNETDISC?= ${LIBDESTDIR}${LIBDIR_BASE}/libibnetdisc.a LIBIBUMAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libibumad.a LIBIBVERBS?= ${LIBDESTDIR}${LIBDIR_BASE}/libibverbs.a LIBIPSEC?= ${LIBDESTDIR}${LIBDIR_BASE}/libipsec.a LIBIPT?= ${LIBDESTDIR}${LIBDIR_BASE}/libipt.a LIBJAIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libjail.a LIBKADM5CLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5clnt.a LIBKADM5SRV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkadm5srv.a LIBKAFS5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkafs5.a LIBKDC?= ${LIBDESTDIR}${LIBDIR_BASE}/libkdc.a LIBKEYCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libkeycap.a LIBKICONV?= ${LIBDESTDIR}${LIBDIR_BASE}/libkiconv.a LIBKRB5?= ${LIBDESTDIR}${LIBDIR_BASE}/libkrb5.a LIBKVM?= ${LIBDESTDIR}${LIBDIR_BASE}/libkvm.a LIBL?= ${LIBDESTDIR}${LIBDIR_BASE}/libl.a LIBLN?= "don't use LIBLN, use LIBL" LIBLZMA?= ${LIBDESTDIR}${LIBDIR_BASE}/liblzma.a LIBM?= ${LIBDESTDIR}${LIBDIR_BASE}/libm.a LIBMAGIC?= ${LIBDESTDIR}${LIBDIR_BASE}/libmagic.a LIBMD?= ${LIBDESTDIR}${LIBDIR_BASE}/libmd.a LIBMEMSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmemstat.a LIBMENU?= ${LIBDESTDIR}${LIBDIR_BASE}/libmenu.a LIBMILTER?= ${LIBDESTDIR}${LIBDIR_BASE}/libmilter.a LIBMLX4?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx4.a LIBMLX5?= ${LIBDESTDIR}${LIBDIR_BASE}/libmlx5.a LIBMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libmp.a LIBMT?= ${LIBDESTDIR}${LIBDIR_BASE}/libmt.a LIBNCURSES?= ${LIBDESTDIR}${LIBDIR_BASE}/libncurses.a LIBNCURSESW?= ${LIBDESTDIR}${LIBDIR_BASE}/libncursesw.a LIBNETGRAPH?= ${LIBDESTDIR}${LIBDIR_BASE}/libnetgraph.a LIBNGATM?= ${LIBDESTDIR}${LIBDIR_BASE}/libngatm.a LIBNV?= ${LIBDESTDIR}${LIBDIR_BASE}/libnv.a LIBNVPAIR?= ${LIBDESTDIR}${LIBDIR_BASE}/libnvpair.a LIBOPENCSD?= ${LIBDESTDIR}${LIBDIR_BASE}/libopencsd.a LIBOPENSM?= ${LIBDESTDIR}${LIBDIR_BASE}/libopensm.a LIBOPIE?= ${LIBDESTDIR}${LIBDIR_BASE}/libopie.a LIBOSMCOMP?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmcomp.a LIBOSMVENDOR?= ${LIBDESTDIR}${LIBDIR_BASE}/libosmvendor.a LIBPAM?= ${LIBDESTDIR}${LIBDIR_BASE}/libpam.a LIBPANEL?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanel.a LIBPANELW?= ${LIBDESTDIR}${LIBDIR_BASE}/libpanelw.a LIBPCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libpcap.a LIBPJDLOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libpjdlog.a LIBPMC?= ${LIBDESTDIR}${LIBDIR_BASE}/libpmc.a LIBPROC?= ${LIBDESTDIR}${LIBDIR_BASE}/libproc.a LIBPROCSTAT?= ${LIBDESTDIR}${LIBDIR_BASE}/libprocstat.a LIBPTHREAD?= ${LIBDESTDIR}${LIBDIR_BASE}/libpthread.a LIBRADIUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libradius.a LIBRDMACM?= ${LIBDESTDIR}${LIBDIR_BASE}/librdmacm.a LIBREGEX?= ${LIBDESTDIR}${LIBDIR_BASE}/libregex.a LIBROKEN?= ${LIBDESTDIR}${LIBDIR_BASE}/libroken.a LIBRPCSEC_GSS?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsec_gss.a LIBRPCSVC?= ${LIBDESTDIR}${LIBDIR_BASE}/librpcsvc.a LIBRT?= ${LIBDESTDIR}${LIBDIR_BASE}/librt.a LIBRTLD_DB?= ${LIBDESTDIR}${LIBDIR_BASE}/librtld_db.a LIBSBUF?= ${LIBDESTDIR}${LIBDIR_BASE}/libsbuf.a LIBSDP?= ${LIBDESTDIR}${LIBDIR_BASE}/libsdp.a LIBSMB?= ${LIBDESTDIR}${LIBDIR_BASE}/libsmb.a LIBSSL?= ${LIBDESTDIR}${LIBDIR_BASE}/libssl.a LIBSSP_NONSHARED?= ${LIBDESTDIR}${LIBDIR_BASE}/libssp_nonshared.a +LIBSTATS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstats.a LIBSTDCPLUSPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdc++.a LIBSTDTHREADS?= ${LIBDESTDIR}${LIBDIR_BASE}/libstdthreads.a LIBSYSDECODE?= ${LIBDESTDIR}${LIBDIR_BASE}/libsysdecode.a LIBTACPLUS?= ${LIBDESTDIR}${LIBDIR_BASE}/libtacplus.a LIBTERMCAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcap.a LIBTERMCAPW?= ${LIBDESTDIR}${LIBDIR_BASE}/libtermcapw.a LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES" LIBUFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libufs.a LIBUGIDFW?= ${LIBDESTDIR}${LIBDIR_BASE}/libugidfw.a LIBULOG?= ${LIBDESTDIR}${LIBDIR_BASE}/libulog.a LIBUMEM?= ${LIBDESTDIR}${LIBDIR_BASE}/libumem.a LIBUSB?= ${LIBDESTDIR}${LIBDIR_BASE}/libusb.a LIBUSBHID?= ${LIBDESTDIR}${LIBDIR_BASE}/libusbhid.a LIBUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libutil.a LIBUUTIL?= ${LIBDESTDIR}${LIBDIR_BASE}/libuutil.a LIBVGL?= ${LIBDESTDIR}${LIBDIR_BASE}/libvgl.a LIBVMMAPI?= ${LIBDESTDIR}${LIBDIR_BASE}/libvmmapi.a LIBWIND?= ${LIBDESTDIR}${LIBDIR_BASE}/libwind.a LIBWRAP?= ${LIBDESTDIR}${LIBDIR_BASE}/libwrap.a LIBXO?= ${LIBDESTDIR}${LIBDIR_BASE}/libxo.a LIBXPG4?= ${LIBDESTDIR}${LIBDIR_BASE}/libxpg4.a LIBY?= ${LIBDESTDIR}${LIBDIR_BASE}/liby.a LIBYPCLNT?= ${LIBDESTDIR}${LIBDIR_BASE}/libypclnt.a LIBZ?= ${LIBDESTDIR}${LIBDIR_BASE}/libz.a LIBZFS?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs.a LIBZFS_CORE?= ${LIBDESTDIR}${LIBDIR_BASE}/libzfs_core.a LIBZPOOL?= ${LIBDESTDIR}${LIBDIR_BASE}/libzpool.a # enforce the 2 -lpthread and -lc to always be the last in that exact order .if defined(LDADD) .if ${LDADD:M-lpthread} LDADD:= ${LDADD:N-lpthread} -lpthread .endif .if ${LDADD:M-lc} LDADD:= ${LDADD:N-lc} -lc .endif .endif # Only do this for src builds. .if defined(SRCTOP) .if defined(_LIBRARIES) && defined(LIB) && \ ${_LIBRARIES:M${LIB}} != "" .if !defined(LIB${LIB:tu}) .error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIBDESTDIR}$${LIBDIR_BASE}/lib${LIB}.a .endif .endif # Derive LIB*SRCDIR from LIB*DIR .for lib in ${_LIBRARIES} LIB${lib:tu}SRCDIR?= ${SRCTOP}/${LIB${lib:tu}DIR:S,^${OBJTOP}/,,} .endfor .else # Out of tree builds # There are LIBADD defined in an out-of-tree build. Are they *all* # in-tree libraries? If so convert them to LDADD to support # partial checkouts. .if !empty(LIBADD) _convert_libadd= 1 .for l in ${LIBADD} .if empty(LIB${l:tu}) _convert_libadd= 0 .endif .endfor .if ${_convert_libadd} == 1 .warning Converting out-of-tree build LIBADDs into LDADD. This is not fully supported. .for l in ${LIBADD} LDADD+= -l${l} .endfor .endif .endif .endif # defined(SRCTOP) Index: head/share/mk/src.libnames.mk =================================================================== --- head/share/mk/src.libnames.mk (revision 353282) +++ head/share/mk/src.libnames.mk (revision 353283) @@ -1,655 +1,657 @@ # $FreeBSD$ # # The include file define library names suitable # for INTERNALLIB and PRIVATELIB definition .if !target(____) .error src.libnames.mk cannot be included directly. .endif .if !target(____) ____: .include _PRIVATELIBS= \ atf_c \ atf_cxx \ bsdstat \ devdctl \ event \ gmock \ gtest \ gmock_main \ gtest_main \ heimipcc \ heimipcs \ ldns \ sqlite3 \ ssh \ ucl \ unbound \ zstd _INTERNALLIBS= \ amu \ bsnmptools \ c_nossp_pic \ cron \ elftc \ fifolog \ ifconfig \ ipf \ lpr \ netbsd \ ntp \ ntpevent \ openbsd \ opts \ parse \ pe \ pmcstat \ sl \ sm \ smdb \ smutil \ telnet \ vers _LIBRARIES= \ ${_PRIVATELIBS} \ ${_INTERNALLIBS} \ ${LOCAL_LIBRARIES} \ 80211 \ alias \ archive \ asn1 \ auditd \ avl \ be \ begemot \ bluetooth \ bsdxml \ bsm \ bsnmp \ bz2 \ c \ c_pic \ calendar \ cam \ casper \ cap_dns \ cap_fileargs \ cap_grp \ cap_pwd \ cap_sysctl \ cap_syslog \ com_err \ compiler_rt \ crypt \ crypto \ ctf \ cuse \ cxxrt \ devctl \ devdctl \ devinfo \ devstat \ dialog \ dl \ dpv \ dtrace \ dwarf \ edit \ efivar \ elf \ execinfo \ fetch \ figpar \ geom \ gnuregex \ gpio \ gssapi \ gssapi_krb5 \ hdb \ heimbase \ heimntlm \ heimsqlite \ hx509 \ ipsec \ ipt \ jail \ kadm5clnt \ kadm5srv \ kafs5 \ kdc \ kiconv \ krb5 \ kvm \ l \ lzma \ m \ magic \ md \ memstat \ mp \ mt \ ncurses \ ncursesw \ netgraph \ ngatm \ nv \ nvpair \ opencsd \ opie \ pam \ panel \ panelw \ pcap \ pcsclite \ pjdlog \ pmc \ proc \ procstat \ pthread \ radius \ regex \ roken \ rpcsec_gss \ rpcsvc \ rt \ rtld_db \ sbuf \ sdp \ sm \ smb \ ssl \ ssp_nonshared \ + stats \ stdthreads \ supcplusplus \ sysdecode \ tacplus \ termcap \ termcapw \ ufs \ ugidfw \ ulog \ umem \ usb \ usbhid \ util \ uutil \ vmmapi \ wind \ wrap \ xo \ y \ ypclnt \ z \ zfs_core \ zfs \ zpool \ .if ${MK_BLACKLIST} != "no" _LIBRARIES+= \ blacklist \ .endif .if ${MK_OFED} != "no" _LIBRARIES+= \ cxgb4 \ ibcm \ ibmad \ ibnetdisc \ ibumad \ ibverbs \ mlx4 \ mlx5 \ rdmacm \ osmcomp \ opensm \ osmvendor .endif .if ${MK_BEARSSL} == "yes" _INTERNALLIBS+= \ bearssl \ secureboot \ LIBBEARSSL?= ${LIBBEARSSLDIR}/libbearssl${PIE_SUFFIX}.a LIBSECUREBOOT?= ${LIBSECUREBOOTDIR}/libsecureboot${PIE_SUFFIX}.a .endif .if ${MK_VERIEXEC} == "yes" _INTERNALLIBS+= veriexec LIBVERIEXEC?= ${LIBVERIEXECDIR}/libveriexec${PIE_SUFFIX}.a .endif # Each library's LIBADD needs to be duplicated here for static linkage of # 2nd+ order consumers. Auto-generating this would be better. _DP_80211= sbuf bsdxml _DP_archive= z bz2 lzma bsdxml zstd _DP_zstd= pthread .if ${MK_BLACKLIST} != "no" _DP_blacklist+= pthread .endif _DP_crypto= pthread .if ${MK_OPENSSL} != "no" _DP_archive+= crypto .else _DP_archive+= md .endif _DP_sqlite3= pthread _DP_ssl= crypto _DP_ssh= crypto crypt z .if ${MK_LDNS} != "no" _DP_ssh+= ldns .endif _DP_edit= ncursesw .if ${MK_OPENSSL} != "no" _DP_bsnmp= crypto .endif _DP_geom= bsdxml sbuf _DP_cam= sbuf _DP_kvm= elf _DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv _DP_cap_grp= nv _DP_cap_pwd= nv _DP_cap_sysctl= nv _DP_cap_syslog= nv .if ${MK_OFED} != "no" _DP_pcap= ibverbs mlx5 .endif _DP_pjdlog= util _DP_opie= md _DP_usb= pthread _DP_unbound= ssl crypto pthread _DP_rt= pthread .if ${MK_OPENSSL} == "no" _DP_radius= md .else _DP_radius= crypto .endif _DP_rtld_db= elf procstat _DP_procstat= kvm util elf .if ${MK_CXX} == "yes" .if ${MK_LIBCPLUSPLUS} != "no" _DP_proc= cxxrt .else _DP_proc= supcplusplus .endif .endif .if ${MK_CDDL} != "no" _DP_proc+= ctf .endif _DP_proc+= elf procstat rtld_db util _DP_mp= crypto _DP_memstat= kvm _DP_magic= z _DP_mt= sbuf bsdxml _DP_ldns= ssl crypto .if ${MK_OPENSSL} != "no" _DP_fetch= ssl crypto .else _DP_fetch= md .endif _DP_execinfo= elf _DP_dwarf= elf _DP_dpv= dialog figpar util ncursesw _DP_dialog= ncursesw m _DP_cuse= pthread _DP_atf_cxx= atf_c _DP_gtest= pthread _DP_gmock= gtest _DP_gmock_main= gmock _DP_gtest_main= gtest _DP_devstat= kvm _DP_pam= radius tacplus opie md util .if ${MK_KERBEROS} != "no" _DP_pam+= krb5 .endif .if ${MK_OPENSSH} != "no" _DP_pam+= ssh .endif .if ${MK_NIS} != "no" _DP_pam+= ypclnt .endif _DP_roken= crypt _DP_kadm5clnt= com_err krb5 roken _DP_kadm5srv= com_err hdb krb5 roken _DP_heimntlm= crypto com_err krb5 roken _DP_hx509= asn1 com_err crypto roken wind _DP_hdb= asn1 com_err krb5 roken sqlite3 _DP_asn1= com_err roken _DP_kdc= roken hdb hx509 krb5 heimntlm asn1 crypto _DP_wind= com_err roken _DP_heimbase= pthread _DP_heimipcc= heimbase roken pthread _DP_heimipcs= heimbase roken pthread _DP_kafs5= asn1 krb5 roken _DP_krb5+= asn1 com_err crypt crypto hx509 roken wind heimbase heimipcc _DP_gssapi_krb5+= gssapi krb5 crypto roken asn1 com_err _DP_lzma= pthread _DP_ucl= m _DP_vmmapi= util _DP_opencsd= cxxrt _DP_ctf= z _DP_dtrace= ctf elf proc pthread rtld_db _DP_xo= util # The libc dependencies are not strictly needed but are defined to make the # assert happy. _DP_c= compiler_rt .if ${MK_SSP} != "no" _DP_c+= ssp_nonshared .endif +_DP_stats= sbuf pthread _DP_stdthreads= pthread _DP_tacplus= md _DP_panel= ncurses _DP_panelw= ncursesw _DP_rpcsec_gss= gssapi _DP_smb= kiconv _DP_ulog= md _DP_fifolog= z _DP_ipf= kvm _DP_zfs= md pthread umem util uutil m nvpair avl bsdxml geom nvpair z \ zfs_core _DP_zfs_core= nvpair _DP_zpool= md pthread z nvpair avl umem _DP_be= zfs nvpair # OFED support .if ${MK_OFED} != "no" _DP_cxgb4= ibverbs pthread _DP_ibcm= ibverbs _DP_ibmad= ibumad _DP_ibnetdisc= osmcomp ibmad ibumad _DP_ibumad= _DP_ibverbs= _DP_mlx4= ibverbs pthread _DP_mlx5= ibverbs pthread _DP_rdmacm= ibverbs _DP_osmcomp= pthread _DP_opensm= pthread _DP_osmvendor= ibumad pthread .endif # Define special cases LDADD_supcplusplus= -lsupc++ LIBATF_C= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c.a LIBATF_CXX= ${LIBDESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a LDADD_atf_c= -lprivateatf-c LDADD_atf_cxx= -lprivateatf-c++ LIBGMOCK= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock.a LIBGMOCK_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategmock_main.a LIBGTEST= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest.a LIBGTEST_MAIN= ${LIBDESTDIR}${LIBDIR_BASE}/libprivategtest_main.a LDADD_gmock= -lprivategmock LDADD_gtest= -lprivategtest LDADD_gmock_main= -lprivategmock_main LDADD_gtest_main= -lprivategtest_main .for _l in ${_PRIVATELIBS} LIB${_l:tu}?= ${LIBDESTDIR}${LIBDIR_BASE}/libprivate${_l}.a .endfor .if ${MK_PIE} != "no" PIE_SUFFIX= _pie .endif .for _l in ${_LIBRARIES} .if ${_INTERNALLIBS:M${_l}} || !defined(SYSROOT) LDADD_${_l}_L+= -L${LIB${_l:tu}DIR} .endif DPADD_${_l}?= ${LIB${_l:tu}} .if ${_PRIVATELIBS:M${_l}} LDADD_${_l}?= -lprivate${_l} .elif ${_INTERNALLIBS:M${_l}} LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l:S/${PIE_SUFFIX}//}${PIE_SUFFIX} .else LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l} .endif # Add in all dependencies for static linkage. .if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \ (defined(NO_SHARED) && ${NO_SHARED:tl} != "no")) .for _d in ${_DP_${_l}} DPADD_${_l}+= ${DPADD_${_d}} LDADD_${_l}+= ${LDADD_${_d}} .endfor .endif .endfor # These are special cases where the library is broken and anything that uses # it needs to add more dependencies. Broken usually means that it has a # cyclic dependency and cannot link its own dependencies. This is bad, please # fix the library instead. # Unless the library itself is broken then the proper place to define # dependencies is _DP_* above. # libatf-c++ exposes libatf-c abi hence we need to explicit link to atf_c for # atf_cxx DPADD_atf_cxx+= ${DPADD_atf_c} LDADD_atf_cxx+= ${LDADD_atf_c} DPADD_gmock+= ${DPADD_gtest} LDADD_gmock+= ${LDADD_gtest} DPADD_gmock_main+= ${DPADD_gmock} LDADD_gmock_main+= ${LDADD_gmock} DPADD_gtest_main+= ${DPADD_gtest} LDADD_gtest_main+= ${LDADD_gtest} # Detect LDADD/DPADD that should be LIBADD, before modifying LDADD here. _BADLDADD= .for _l in ${LDADD:M-l*:N-l*/*:C,^-l,,} .if ${_LIBRARIES:M${_l}} && !${_PRIVATELIBS:M${_l}} _BADLDADD+= ${_l} .endif .endfor .if !empty(_BADLDADD) .error ${.CURDIR}: These libraries should be LIBADD+=foo rather than DPADD/LDADD+=-lfoo: ${_BADLDADD} .endif .for _l in ${LIBADD} DPADD+= ${DPADD_${_l}} LDADD+= ${LDADD_${_l}} .endfor # INTERNALLIB definitions. LIBELFTCDIR= ${OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a LIBPEDIR= ${OBJTOP}/lib/libpe LIBPE?= ${LIBPEDIR}/libpe${PIE_SUFFIX}.a LIBOPENBSDDIR= ${OBJTOP}/lib/libopenbsd LIBOPENBSD?= ${LIBOPENBSDDIR}/libopenbsd${PIE_SUFFIX}.a LIBSMDIR= ${OBJTOP}/lib/libsm LIBSM?= ${LIBSMDIR}/libsm${PIE_SUFFIX}.a LIBSMDBDIR= ${OBJTOP}/lib/libsmdb LIBSMDB?= ${LIBSMDBDIR}/libsmdb${PIE_SUFFIX}.a LIBSMUTILDIR= ${OBJTOP}/lib/libsmutil LIBSMUTIL?= ${LIBSMUTILDIR}/libsmutil${PIE_SUFFIX}.a LIBNETBSDDIR?= ${OBJTOP}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd${PIE_SUFFIX}.a LIBVERSDIR?= ${OBJTOP}/kerberos5/lib/libvers LIBVERS?= ${LIBVERSDIR}/libvers${PIE_SUFFIX}.a LIBSLDIR= ${OBJTOP}/kerberos5/lib/libsl LIBSL?= ${LIBSLDIR}/libsl${PIE_SUFFIX}.a LIBIFCONFIGDIR= ${OBJTOP}/lib/libifconfig LIBIFCONFIG?= ${LIBIFCONFIGDIR}/libifconfig${PIE_SUFFIX}.a LIBIPFDIR= ${OBJTOP}/sbin/ipf/libipf LIBIPF?= ${LIBIPFDIR}/libipf${PIE_SUFFIX}.a LIBTELNETDIR= ${OBJTOP}/lib/libtelnet LIBTELNET?= ${LIBTELNETDIR}/libtelnet${PIE_SUFFIX}.a LIBCRONDIR= ${OBJTOP}/usr.sbin/cron/lib LIBCRON?= ${LIBCRONDIR}/libcron${PIE_SUFFIX}.a LIBNTPDIR= ${OBJTOP}/usr.sbin/ntp/libntp LIBNTP?= ${LIBNTPDIR}/libntp${PIE_SUFFIX}.a LIBNTPEVENTDIR= ${OBJTOP}/usr.sbin/ntp/libntpevent LIBNTPEVENT?= ${LIBNTPEVENTDIR}/libntpevent${PIE_SUFFIX}.a LIBOPTSDIR= ${OBJTOP}/usr.sbin/ntp/libopts LIBOPTS?= ${LIBOPTSDIR}/libopts${PIE_SUFFIX}.a LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse${PIE_SUFFIX}.a LIBLPRDIR= ${OBJTOP}/usr.sbin/lpr/common_source LIBLPR?= ${LIBLPRDIR}/liblpr${PIE_SUFFIX}.a LIBFIFOLOGDIR= ${OBJTOP}/usr.sbin/fifolog/lib LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog${PIE_SUFFIX}.a LIBBSNMPTOOLSDIR= ${OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools${PIE_SUFFIX}.a LIBAMUDIR= ${OBJTOP}/usr.sbin/amd/libamu LIBAMU?= ${LIBAMUDIR}/libamu${PIE_SUFFIX}.a LIBBE?= ${LIBBEDIR}/libbe${PIE_SUFFIX}.a LIBPMCSTATDIR= ${OBJTOP}/lib/libpmcstat LIBPMCSTAT?= ${LIBPMCSTATDIR}/libpmcstat${PIE_SUFFIX}.a LIBC_NOSSP_PICDIR= ${OBJTOP}/lib/libc LIBC_NOSSP_PIC?= ${LIBC_NOSSP_PICDIR}/libc_nossp_pic.a # Define a directory for each library. This is useful for adding -L in when # not using a --sysroot or for meta mode bootstrapping when there is no # Makefile.depend. These are sorted by directory. LIBAVLDIR= ${OBJTOP}/cddl/lib/libavl LIBCTFDIR= ${OBJTOP}/cddl/lib/libctf LIBDTRACEDIR= ${OBJTOP}/cddl/lib/libdtrace LIBNVPAIRDIR= ${OBJTOP}/cddl/lib/libnvpair LIBUMEMDIR= ${OBJTOP}/cddl/lib/libumem LIBUUTILDIR= ${OBJTOP}/cddl/lib/libuutil LIBZFSDIR= ${OBJTOP}/cddl/lib/libzfs LIBZFS_COREDIR= ${OBJTOP}/cddl/lib/libzfs_core LIBZPOOLDIR= ${OBJTOP}/cddl/lib/libzpool # OFED support LIBCXGB4DIR= ${OBJTOP}/lib/ofed/libcxgb4 LIBIBCMDIR= ${OBJTOP}/lib/ofed/libibcm LIBIBMADDIR= ${OBJTOP}/lib/ofed/libibmad LIBIBNETDISCDIR=${OBJTOP}/lib/ofed/libibnetdisc LIBIBUMADDIR= ${OBJTOP}/lib/ofed/libibumad LIBIBVERBSDIR= ${OBJTOP}/lib/ofed/libibverbs LIBMLX4DIR= ${OBJTOP}/lib/ofed/libmlx4 LIBMLX5DIR= ${OBJTOP}/lib/ofed/libmlx5 LIBRDMACMDIR= ${OBJTOP}/lib/ofed/librdmacm LIBOSMCOMPDIR= ${OBJTOP}/lib/ofed/complib LIBOPENSMDIR= ${OBJTOP}/lib/ofed/libopensm LIBOSMVENDORDIR=${OBJTOP}/lib/ofed/libvendor LIBDIALOGDIR= ${OBJTOP}/gnu/lib/libdialog LIBGCOVDIR= ${OBJTOP}/gnu/lib/libgcov LIBGOMPDIR= ${OBJTOP}/gnu/lib/libgomp LIBGNUREGEXDIR= ${OBJTOP}/gnu/lib/libregex LIBSSPDIR= ${OBJTOP}/gnu/lib/libssp LIBSSP_NONSHAREDDIR= ${OBJTOP}/gnu/lib/libssp/libssp_nonshared LIBSUPCPLUSPLUSDIR= ${OBJTOP}/gnu/lib/libsupc++ LIBASN1DIR= ${OBJTOP}/kerberos5/lib/libasn1 LIBGSSAPI_KRB5DIR= ${OBJTOP}/kerberos5/lib/libgssapi_krb5 LIBGSSAPI_NTLMDIR= ${OBJTOP}/kerberos5/lib/libgssapi_ntlm LIBGSSAPI_SPNEGODIR= ${OBJTOP}/kerberos5/lib/libgssapi_spnego LIBHDBDIR= ${OBJTOP}/kerberos5/lib/libhdb LIBHEIMBASEDIR= ${OBJTOP}/kerberos5/lib/libheimbase LIBHEIMIPCCDIR= ${OBJTOP}/kerberos5/lib/libheimipcc LIBHEIMIPCSDIR= ${OBJTOP}/kerberos5/lib/libheimipcs LIBHEIMNTLMDIR= ${OBJTOP}/kerberos5/lib/libheimntlm LIBHX509DIR= ${OBJTOP}/kerberos5/lib/libhx509 LIBKADM5CLNTDIR= ${OBJTOP}/kerberos5/lib/libkadm5clnt LIBKADM5SRVDIR= ${OBJTOP}/kerberos5/lib/libkadm5srv LIBKAFS5DIR= ${OBJTOP}/kerberos5/lib/libkafs5 LIBKDCDIR= ${OBJTOP}/kerberos5/lib/libkdc LIBKRB5DIR= ${OBJTOP}/kerberos5/lib/libkrb5 LIBROKENDIR= ${OBJTOP}/kerberos5/lib/libroken LIBWINDDIR= ${OBJTOP}/kerberos5/lib/libwind LIBATF_CDIR= ${OBJTOP}/lib/atf/libatf-c LIBATF_CXXDIR= ${OBJTOP}/lib/atf/libatf-c++ LIBGMOCKDIR= ${OBJTOP}/lib/googletest/gmock LIBGMOCK_MAINDIR= ${OBJTOP}/lib/googletest/gmock_main LIBGTESTDIR= ${OBJTOP}/lib/googletest/gtest LIBGTEST_MAINDIR= ${OBJTOP}/lib/googletest/gtest_main LIBALIASDIR= ${OBJTOP}/lib/libalias/libalias LIBBLACKLISTDIR= ${OBJTOP}/lib/libblacklist LIBBLOCKSRUNTIMEDIR= ${OBJTOP}/lib/libblocksruntime LIBBSNMPDIR= ${OBJTOP}/lib/libbsnmp/libbsnmp LIBCASPERDIR= ${OBJTOP}/lib/libcasper/libcasper LIBCAP_DNSDIR= ${OBJTOP}/lib/libcasper/services/cap_dns LIBCAP_GRPDIR= ${OBJTOP}/lib/libcasper/services/cap_grp LIBCAP_PWDDIR= ${OBJTOP}/lib/libcasper/services/cap_pwd LIBCAP_SYSCTLDIR= ${OBJTOP}/lib/libcasper/services/cap_sysctl LIBCAP_SYSLOGDIR= ${OBJTOP}/lib/libcasper/services/cap_syslog LIBBSDXMLDIR= ${OBJTOP}/lib/libexpat LIBKVMDIR= ${OBJTOP}/lib/libkvm LIBPTHREADDIR= ${OBJTOP}/lib/libthr LIBMDIR= ${OBJTOP}/lib/msun LIBFORMDIR= ${OBJTOP}/lib/ncurses/form LIBFORMLIBWDIR= ${OBJTOP}/lib/ncurses/formw LIBMENUDIR= ${OBJTOP}/lib/ncurses/menu LIBMENULIBWDIR= ${OBJTOP}/lib/ncurses/menuw LIBNCURSESDIR= ${OBJTOP}/lib/ncurses/ncurses LIBNCURSESWDIR= ${OBJTOP}/lib/ncurses/ncursesw LIBPANELDIR= ${OBJTOP}/lib/ncurses/panel LIBPANELWDIR= ${OBJTOP}/lib/ncurses/panelw LIBCRYPTODIR= ${OBJTOP}/secure/lib/libcrypto LIBSSHDIR= ${OBJTOP}/secure/lib/libssh LIBSSLDIR= ${OBJTOP}/secure/lib/libssl LIBTEKENDIR= ${OBJTOP}/sys/teken/libteken LIBEGACYDIR= ${OBJTOP}/tools/build LIBLNDIR= ${OBJTOP}/usr.bin/lex/lib LIBTERMCAPDIR= ${LIBNCURSESDIR} LIBTERMCAPWDIR= ${LIBNCURSESWDIR} # Default other library directories to lib/libNAME. .for lib in ${_LIBRARIES} LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor # Validate that listed LIBADD are valid. .for _l in ${LIBADD} .if empty(_LIBRARIES:M${_l}) _BADLIBADD+= ${_l} .endif .endfor .if !empty(_BADLIBADD) .error ${.CURDIR}: Invalid LIBADD used which may need to be added to ${_this:T}: ${_BADLIBADD} .endif # Sanity check that libraries are defined here properly when building them. .if defined(LIB) && ${_LIBRARIES:M${LIB}} != "" .if !empty(LIBADD) && \ (!defined(_DP_${LIB}) || ${LIBADD:O:u} != ${_DP_${LIB}:O:u}) .error ${.CURDIR}: Missing or incorrect _DP_${LIB} entry in ${_this:T}. Should match LIBADD for ${LIB} ('${LIBADD}' vs '${_DP_${LIB}}') .endif # Note that OBJTOP is not yet defined here but for the purpose of the check # it is fine as it resolves to the SRC directory. .if !defined(LIB${LIB:tu}DIR) || !exists(${SRCTOP}/${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,}) .error ${.CURDIR}: Missing or incorrect value for LIB${LIB:tu}DIR in ${_this:T}: ${LIB${LIB:tu}DIR:S,^${OBJTOP}/,,} .endif .if ${_INTERNALLIBS:M${LIB}} != "" && !defined(LIB${LIB:tu}) .error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${LIB${LIB:tu}DIR}/lib${LIB}.a .endif .endif .endif # !target(____) Index: head/share/mk/src.opts.mk =================================================================== --- head/share/mk/src.opts.mk (revision 353282) +++ head/share/mk/src.opts.mk (revision 353283) @@ -1,598 +1,599 @@ # $FreeBSD$ # # Option file for FreeBSD /usr/src builds. # # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} # with sensible (usually) defaults. # # Makefiles must include bsd.opts.mk after defining specific MK_FOO options that # are applicable for that Makefile (typically there are none, but sometimes there # are exceptions). Recursive makes usually add MK_FOO=no for options that they wish # to omit from that make. # # Makefiles must include bsd.mkopt.mk before they test the value of any MK_FOO # variable. # # Makefiles may also assume that this file is included by src.opts.mk should it # need variables defined there prior to the end of the Makefile where # bsd.{subdir,lib.bin}.mk is traditionally included. # # The old-style YES_FOO and NO_FOO are being phased out. No new instances of them # should be added. Old instances should be removed since they were just to # bridge the gap between FreeBSD 4 and FreeBSD 5. # # Makefiles should never test WITH_FOO or WITHOUT_FOO directly (although an # exception is made for _WITHOUT_SRCONF which turns off this mechanism # completely inside bsd.*.mk files). # .if !target(____) ____: .include # # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. # These should be tested with `== "no"' or `!= "no"' in makefiles. # The NO_* variables should only be set by makefiles for variables # that haven't been converted over. # # These options are used by the src builds. Those listed in # __DEFAULT_YES_OPTIONS default to 'yes' and will build unless turned # off. __DEFAULT_NO_OPTIONS will default to 'no' and won't build # unless turned on. Any options listed in 'BROKEN_OPTIONS' will be # hard-wired to 'no'. "Broken" here means not working or # not-appropriate and/or not supported. It doesn't imply something is # wrong with the code. There's not a single good word for this, so # BROKEN was selected as the least imperfect one considered at the # time. Options are added to BROKEN_OPTIONS list on a per-arch basis. # At this time, there's no provision for mutually incompatible options. __DEFAULT_YES_OPTIONS = \ ACCT \ ACPI \ AMD \ APM \ AT \ ATM \ AUDIT \ AUTHPF \ AUTOFS \ BHYVE \ BINUTILS \ BINUTILS_BOOTSTRAP \ BLACKLIST \ BLUETOOTH \ BOOT \ BOOTPARAMD \ BOOTPD \ BSD_CPIO \ BSD_CRTBEGIN \ BSDINSTALL \ BSNMP \ BZIP2 \ CALENDAR \ CAPSICUM \ CAROOT \ CASPER \ CCD \ CDDL \ CPP \ CROSS_COMPILER \ CRYPT \ CUSE \ CXX \ CXGBETOOL \ DIALOG \ DICT \ DMAGENT \ DYNAMICROOT \ EE \ EFI \ ELFTOOLCHAIN_BOOTSTRAP \ EXAMPLES \ FDT \ FILE \ FINGER \ FLOPPY \ FMTREE \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ FTP \ GAMES \ GCOV \ GDB \ GNU_DIFF \ GNU_GREP \ GPIO \ HAST \ HTML \ HYPERV \ ICONV \ INET \ INET6 \ INETD \ IPFILTER \ IPFW \ ISCSI \ JAIL \ KDUMP \ KVM \ LDNS \ LDNS_UTILS \ LEGACY_CONSOLE \ LIB32 \ LIBPTHREAD \ LIBTHR \ LLVM_COV \ LOADER_GELI \ LOADER_LUA \ LOADER_OFW \ LOADER_UBOOT \ LOCALES \ LOCATE \ LPR \ LS_COLORS \ LZMA_SUPPORT \ MAIL \ MAILWRAPPER \ MAKE \ MLX5TOOL \ NDIS \ NETCAT \ NETGRAPH \ NLS_CATALOGS \ NS_CACHING \ NTP \ NVME \ OFED \ OPENSSL \ PAM \ PF \ PKGBOOTSTRAP \ PMC \ PORTSNAP \ PPP \ QUOTAS \ RADIUS_SUPPORT \ RBOOTD \ RESCUE \ ROUTED \ SENDMAIL \ SERVICESDB \ SETUID_LOGIN \ SHAREDOCS \ SOURCELESS \ SOURCELESS_HOST \ SOURCELESS_UCODE \ + STATS \ SVNLITE \ SYSCONS \ SYSTEM_COMPILER \ SYSTEM_LINKER \ TALK \ TCP_WRAPPERS \ TCSH \ TELNET \ TEXTPROC \ TFTP \ UNBOUND \ USB \ UTMPX \ VI \ VT \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ LOADER_ZFS \ ZONEINFO __DEFAULT_NO_OPTIONS = \ BEARSSL \ BSD_GREP \ CLANG_EXTRAS \ DTRACE_TESTS \ EXPERIMENTAL \ GNU_GREP_COMPAT \ HESIOD \ HTTPD \ LIBSOFT \ LOADER_FIREWIRE \ LOADER_FORCE_LE \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ RPCBIND_WARMSTART_SUPPORT \ SHARED_TOOLCHAIN \ SORT_THREADS \ SVN \ ZONEINFO_LEAPSECONDS_SUPPORT \ ZONEINFO_OLD_TIMEZONES_SUPPORT \ # LEFT/RIGHT. Left options which default to "yes" unless their corresponding # RIGHT option is disabled. __DEFAULT_DEPENDENT_OPTIONS= \ CLANG_FULL/CLANG \ LLVM_TARGET_ALL/CLANG \ LOADER_VERIEXEC/BEARSSL \ LOADER_EFI_SECUREBOOT/LOADER_VERIEXEC \ VERIEXEC/BEARSSL \ # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # .for var in \ BLACKLIST \ BZIP2 \ INET \ INET6 \ KERBEROS \ KVM \ NETGRAPH \ PAM \ TESTS \ WIRELESS __DEFAULT_DEPENDENT_OPTIONS+= ${var}_SUPPORT/${var} .endfor # # Default behaviour of some options depends on the architecture. Unfortunately # this means that we have to test TARGET_ARCH (the buildworld case) as well # as MACHINE_ARCH (the non-buildworld case). Normally TARGET_ARCH is not # used at all in bsd.*.mk, but we have to make an exception here if we want # to allow defaults for some things like clang to vary by target architecture. # Additional, per-target behavior should be rarely added only after much # gnashing of teeth and grinding of gears. # .if defined(TARGET_ARCH) __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif .if defined(TARGET) __TT=${TARGET} .else __TT=${MACHINE} .endif # Default GOOGLETEST to off for MIPS while LLVM PR 43263 is active. Part # of the fusefs tests trigger excessively long compile times. It does # eventually succeed, but this shouldn't be forced on those building by default. .if ${__TT} == "mips" __DEFAULT_NO_OPTIONS+= GOOGLETEST .else __DEFAULT_YES_OPTIONS+= GOOGLETEST .endif # All supported backends for LLVM_TARGET_XXX __LLVM_TARGETS= \ aarch64 \ arm \ mips \ powerpc \ sparc \ x86 __LLVM_TARGET_FILT= C/(amd64|i386)/x86/:S/sparc64/sparc/:S/arm64/aarch64/:S/powerpc64/powerpc/ .for __llt in ${__LLVM_TARGETS} # Default the given TARGET's LLVM_TARGET support to the value of MK_CLANG. .if ${__TT:${__LLVM_TARGET_FILT}} == ${__llt} __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/CLANG # Disable other targets for arm and armv6, to work around "relocation truncated # to fit" errors with BFD ld, since libllvm.a will get too large to link. .elif ${__T} == "arm" || ${__T} == "armv6" __DEFAULT_NO_OPTIONS+=LLVM_TARGET_${__llt:tu} # aarch64 needs arm for -m32 support. .elif ${__TT} == "arm64" && ${__llt} == "arm" __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_ARM/LLVM_TARGET_AARCH64 # Default the rest of the LLVM_TARGETs to the value of MK_LLVM_TARGET_ALL # which is based on MK_CLANG. .else __DEFAULT_DEPENDENT_OPTIONS+= LLVM_TARGET_${__llt:${__LLVM_TARGET_FILT}:tu}/LLVM_TARGET_ALL .endif .endfor __DEFAULT_NO_OPTIONS+=LLVM_TARGET_BPF __DEFAULT_NO_OPTIONS+=LLVM_TARGET_RISCV .include # If the compiler is not C++11 capable, disable Clang and use GCC instead. # This means that architectures that have GCC 4.2 as default can not # build Clang without using an external compiler. .if ${COMPILER_FEATURES:Mc++11} && (${__T} == "aarch64" || \ ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC .elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mriscv*} == "" && ${__T} != "sparc64" # If an external compiler that supports C++11 is used as ${CC} and Clang # supports the target, then Clang is enabled but GCC is installed as the # default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG GCC GCC_BOOTSTRAP GNUCXX GPL_DTC LLD __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else # Everything else disables Clang, and uses GCC instead. __DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX GPL_DTC __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC LLD .endif # In-tree binutils/gcc are older versions without modern architecture support. .if ${__T} == "aarch64" || ${__T:Mriscv*} != "" BROKEN_OPTIONS+=BINUTILS BINUTILS_BOOTSTRAP GCC GCC_BOOTSTRAP GDB .endif .if ${__T:Mriscv*} != "" BROKEN_OPTIONS+=OFED .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" || \ ${__T:Mriscv*} != "" || ${__TT} == "mips" __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "armv7" || \ ${__T} == "i386" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .else __DEFAULT_NO_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD .endif .if ${__T} == "aarch64" || ${__T} == "amd64" || ${__T} == "i386" __DEFAULT_YES_OPTIONS+=LLDB .else __DEFAULT_NO_OPTIONS+=LLDB .endif # LLVM lacks support for FreeBSD 64-bit atomic operations for ARMv4/ARMv5 .if ${__T} == "arm" BROKEN_OPTIONS+=LLDB .endif # GDB in base is generally less functional than GDB in ports. Ports GDB # sparc64 kernel support has not been tested. .if ${__T} == "sparc64" __DEFAULT_NO_OPTIONS+=GDB_LIBEXEC .else __DEFAULT_YES_OPTIONS+=GDB_LIBEXEC .endif # Only doing soft float API stuff on armv6 and armv7 .if ${__T} != "armv6" && ${__T} != "armv7" BROKEN_OPTIONS+=LIBSOFT .endif .if ${__T:Mmips*} BROKEN_OPTIONS+=SSP .endif # EFI doesn't exist on mips, powerpc, sparc or riscv. .if ${__T:Mmips*} || ${__T:Mpowerpc*} || ${__T:Msparc64} || ${__T:Mriscv*} BROKEN_OPTIONS+=EFI .endif # OFW is only for powerpc and sparc64, exclude others .if ${__T:Mpowerpc*} == "" && ${__T:Msparc64} == "" BROKEN_OPTIONS+=LOADER_OFW .endif # UBOOT is only for arm, mips and powerpc, exclude others .if ${__T:Marm*} == "" && ${__T:Mmips*} == "" && ${__T:Mpowerpc*} == "" BROKEN_OPTIONS+=LOADER_UBOOT .endif # GELI and Lua in loader currently cause boot failures on sparc64 and powerpc. # Further debugging is required -- probably they are just broken on big # endian systems generically (they jump to null pointers or try to read # crazy high addresses, which is typical of endianness problems). .if ${__T} == "sparc64" || ${__T:Mpowerpc*} BROKEN_OPTIONS+=LOADER_GELI LOADER_LUA .endif .if ${__T:Mmips64*} # profiling won't work on MIPS64 because there is only assembly for o32 BROKEN_OPTIONS+=PROFILE .endif .if ${__T} != "aarch64" && ${__T} != "amd64" && ${__T} != "i386" && \ ${__T} != "powerpc64" && ${__T} != "sparc64" BROKEN_OPTIONS+=CXGBETOOL BROKEN_OPTIONS+=MLX5TOOL .endif # HyperV is currently x86-only .if ${__T} != "amd64" && ${__T} != "i386" BROKEN_OPTIONS+=HYPERV .endif # NVME is only aarch64, x86 and powerpc64 .if ${__T} != "aarch64" && ${__T} != "amd64" && ${__T} != "i386" && ${__T} != "powerpc64" BROKEN_OPTIONS+=NVME .endif # Sparc64 need extra crt*.o files .if ${__T:Msparc64} BROKEN_OPTIONS+=BSD_CRTBEGIN .endif .if ${COMPILER_FEATURES:Mc++11} && (${__T} == "amd64" || ${__T} == "i386") __DEFAULT_YES_OPTIONS+=OPENMP .else __DEFAULT_NO_OPTIONS+=OPENMP .endif .include # # MK_* options that default to "yes" if the compiler is a C++11 compiler. # .for var in \ LIBCPLUSPLUS .if !defined(MK_${var}) .if ${COMPILER_FEATURES:Mc++11} .if defined(WITHOUT_${var}) MK_${var}:= no .else MK_${var}:= yes .endif .else .if defined(WITH_${var}) MK_${var}:= yes .else MK_${var}:= no .endif .endif .endif .endfor # # Force some options off if their dependencies are off. # Order is somewhat important. # .if !${COMPILER_FEATURES:Mc++11} MK_GOOGLETEST:= no MK_LLVM_LIBUNWIND:= no .endif .if ${MK_CAPSICUM} == "no" MK_CASPER:= no .endif .if ${MK_LIBPTHREAD} == "no" MK_LIBTHR:= no .endif .if ${MK_LDNS} == "no" MK_LDNS_UTILS:= no MK_UNBOUND:= no .endif .if ${MK_SOURCELESS} == "no" MK_SOURCELESS_HOST:= no MK_SOURCELESS_UCODE:= no .endif .if ${MK_CDDL} == "no" MK_ZFS:= no MK_LOADER_ZFS:= no MK_CTF:= no .endif .if ${MK_CRYPT} == "no" MK_OPENSSL:= no MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_CXX} == "no" MK_CLANG:= no MK_GNUCXX:= no MK_TESTS:= no .endif .if ${MK_DIALOG} == "no" MK_BSDINSTALL:= no .endif .if ${MK_MAIL} == "no" MK_MAILWRAPPER:= no MK_SENDMAIL:= no MK_DMAGENT:= no .endif .if ${MK_NETGRAPH} == "no" MK_ATM:= no MK_BLUETOOTH:= no .endif .if ${MK_NLS} == "no" MK_NLS_CATALOGS:= no .endif .if ${MK_OPENSSL} == "no" MK_OPENSSH:= no MK_KERBEROS:= no .endif .if ${MK_PF} == "no" MK_AUTHPF:= no .endif .if ${MK_OFED} == "no" MK_OFED_EXTRA:= no .endif .if ${MK_PORTSNAP} == "no" # freebsd-update depends on phttpget from portsnap MK_FREEBSD_UPDATE:= no .endif .if ${MK_TESTS} == "no" MK_DTRACE_TESTS:= no .endif .if ${MK_TESTS_SUPPORT} == "no" MK_GOOGLETEST:= no .endif .if ${MK_ZONEINFO} == "no" MK_ZONEINFO_LEAPSECONDS_SUPPORT:= no MK_ZONEINFO_OLD_TIMEZONES_SUPPORT:= no .endif .if ${MK_CROSS_COMPILER} == "no" MK_BINUTILS_BOOTSTRAP:= no MK_CLANG_BOOTSTRAP:= no MK_ELFTOOLCHAIN_BOOTSTRAP:= no MK_GCC_BOOTSTRAP:= no MK_LLD_BOOTSTRAP:= no .endif .if ${MK_TOOLCHAIN} == "no" MK_BINUTILS:= no MK_CLANG:= no MK_GCC:= no MK_GDB:= no MK_INCLUDES:= no MK_LLD:= no MK_LLDB:= no .endif .if ${MK_CLANG} == "no" MK_CLANG_EXTRAS:= no MK_CLANG_FULL:= no MK_LLVM_COV:= no .endif .if ${MK_LOADER_VERIEXEC} == "no" MK_LOADER_VERIEXEC_PASS_MANIFEST := no .endif # # MK_* options whose default value depends on another option. # .for vv in \ GSSAPI/KERBEROS \ MAN_UTILS/MAN .if defined(WITH_${vv:H}) MK_${vv:H}:= yes .elif defined(WITHOUT_${vv:H}) MK_${vv:H}:= no .else MK_${vv:H}:= ${MK_${vv:T}} .endif .endfor # # Set defaults for the MK_*_SUPPORT variables. # .if !${COMPILER_FEATURES:Mc++11} MK_LLDB:= no .endif # gcc 4.8 and newer supports libc++, so suppress gnuc++ in that case. # while in theory we could build it with that, we don't want to do # that since it creates too much confusion for too little gain. # XXX: This is incomplete and needs X_COMPILER_TYPE/VERSION checks too # to prevent Makefile.inc1 from bootstrapping unneeded dependencies # and to support 'make delete-old' when supplying an external toolchain. .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800 MK_GNUCXX:=no MK_GCC:=no .endif .endif # !target(____) Index: head/sys/amd64/conf/NOTES =================================================================== --- head/sys/amd64/conf/NOTES (revision 353282) +++ head/sys/amd64/conf/NOTES (revision 353283) @@ -1,673 +1,675 @@ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # # This file contains machine dependent kernel configuration notes. For # machine independent notes, look in /sys/conf/NOTES. # # $FreeBSD$ # # # We want LINT to cover profiling as well. profile 2 # # Enable the kernel DTrace hooks which are required to load the DTrace # kernel modules. # options KDTRACE_HOOKS # DTrace core # NOTE: introduces CDDL-licensed components into the kernel #device dtrace # DTrace modules #device dtrace_profile #device dtrace_sdt #device dtrace_fbt #device dtrace_systrace #device dtrace_prototype #device dtnfscl #device dtmalloc # Alternatively include all the DTrace modules #device dtraceall ##################################################################### # SMP OPTIONS: # # Notes: # # IPI_PREEMPTION instructs the kernel to preempt threads running on other # CPUS if needed. Relies on the PREEMPTION option # Optional: options IPI_PREEMPTION device atpic # Optional legacy pic support device mptable # Optional MPSPEC mptable support # # Watchdog routines. # options MP_WATCHDOG # Debugging options. # options COUNT_XINVLTLB_HITS # Counters for TLB events options COUNT_IPIS # Per-CPU IPI interrupt counters ##################################################################### # CPU OPTIONS # # You must specify at least one CPU (the one you intend to run on); # deleting the specification for CPUs you don't need to use may make # parts of the system run faster. # cpu HAMMER # aka K8, aka Opteron & Athlon64 # # Options for CPU features. # ##################################################################### # NETWORKING OPTIONS # # DEVICE_POLLING adds support for mixed interrupt-polling handling # of network device drivers, which has significant benefits in terms # of robustness to overloads and responsivity, as well as permitting # accurate scheduling of the CPU time between kernel network processing # and other activities. The drawback is a moderate (up to 1/HZ seconds) # potential increase in response times. # It is strongly recommended to use HZ=1000 or 2000 with DEVICE_POLLING # to achieve smoother behaviour. # Additionally, you can enable/disable polling at runtime with help of # the ifconfig(8) utility, and select the CPU fraction reserved to # userland with the sysctl variable kern.polling.user_frac # (default 50, range 0..100). # # Not all device drivers support this mode of operation at the time of # this writing. See polling(4) for more details. options DEVICE_POLLING # BPF_JITTER adds support for BPF just-in-time compiler. options BPF_JITTER # OpenFabrics Enterprise Distribution (Infiniband). options OFED options OFED_DEBUG_INIT # Sockets Direct Protocol options SDP options SDP_DEBUG # IP over Infiniband options IPOIB options IPOIB_DEBUG options IPOIB_CM ##################################################################### # CLOCK OPTIONS # Provide read/write access to the memory in the clock chip. device nvram # Access to rtc cmos via /dev/nvram ##################################################################### # MISCELLANEOUS DEVICES AND OPTIONS device speaker #Play IBM BASIC-style noises out your speaker hint.speaker.0.at="isa" hint.speaker.0.port="0x61" ##################################################################### # HARDWARE BUS CONFIGURATION # # ISA bus # device isa # # Options for `isa': # # AUTO_EOI_1 enables the `automatic EOI' feature for the master 8259A # interrupt controller. This saves about 0.7-1.25 usec for each interrupt. # This option breaks suspend/resume on some portables. # # AUTO_EOI_2 enables the `automatic EOI' feature for the slave 8259A # interrupt controller. This saves about 0.7-1.25 usec for each interrupt. # Automatic EOI is documented not to work for for the slave with the # original i8259A, but it works for some clones and some integrated # versions. # # MAXMEM specifies the amount of RAM on the machine; if this is not # specified, FreeBSD will first read the amount of memory from the CMOS # RAM, so the amount of memory will initially be limited to 64MB or 16MB # depending on the BIOS. If the BIOS reports 64MB, a memory probe will # then attempt to detect the installed amount of RAM. If this probe # fails to detect >64MB RAM you will have to use the MAXMEM option. # The amount is in kilobytes, so for a machine with 128MB of RAM, it would # be 131072 (128 * 1024). # # BROKEN_KEYBOARD_RESET disables the use of the keyboard controller to # reset the CPU for reboot. This is needed on some systems with broken # keyboard controllers. options AUTO_EOI_1 #options AUTO_EOI_2 options MAXMEM=(128*1024) #options BROKEN_KEYBOARD_RESET # # AGP GART support device agp # # AGP debugging. # options AGP_DEBUG ##################################################################### # HARDWARE DEVICE CONFIGURATION # To include support for VGA VESA video modes options VESA # Turn on extra debugging checks and output for VESA support. options VESA_DEBUG device dpms # DPMS suspend & resume via VESA BIOS # x86 real mode BIOS emulator, required by atkbdc/dpms/vesa options X86BIOS # # Optional devices: # # PS/2 mouse device psm hint.psm.0.at="atkbdc" hint.psm.0.irq="12" # Options for psm: options PSM_HOOKRESUME #hook the system resume event, useful #for some laptops options PSM_RESETAFTERSUSPEND #reset the device at the resume event # The keyboard controller; it controls the keyboard and the PS/2 mouse. device atkbdc hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" # The AT keyboard device atkbd hint.atkbd.0.at="atkbdc" hint.atkbd.0.irq="1" # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap makeoptions ATKBD_DFLT_KEYMAP=fr.dvorak # `flags' for atkbd: # 0x01 Force detection of keyboard, else we always assume a keyboard # 0x02 Don't reset keyboard, useful for some newer ThinkPads # 0x03 Force detection and avoid reset, might help with certain # dockingstations # 0x04 Old-style (XT) keyboard support, useful for older ThinkPads # Video card driver for VGA adapters. device vga hint.vga.0.at="isa" # Options for vga: # Try the following option if the mouse pointer is not drawn correctly # or font does not seem to be loaded properly. May cause flicker on # some systems. options VGA_ALT_SEQACCESS # If you can dispense with some vga driver features, you may want to # use the following options to save some memory. #options VGA_NO_FONT_LOADING # don't save/load font #options VGA_NO_MODE_CHANGE # don't change video modes # Older video cards may require this option for proper operation. options VGA_SLOW_IOACCESS # do byte-wide i/o's to TS and GDC regs # The following option probably won't work with the LCD displays. options VGA_WIDTH90 # support 90 column modes # Debugging. options VGA_DEBUG # vt(4) drivers. device vt_vga # VGA device vt_efifb # EFI framebuffer # Linear framebuffer driver for S3 VESA 1.2 cards. Works on top of VESA. device s3pci # 3Dfx Voodoo Graphics, Voodoo II /dev/3dfx CDEV support. This will create # the /dev/3dfx0 device to work with glide implementations. This should get # linked to /dev/3dfx and /dev/voodoo. Note that this is not the same as # the tdfx DRI module from XFree86 and is completely unrelated. # # To enable Linuxulator support, one must also include COMPAT_LINUX in the # config as well. The other option is to load both as modules. device tdfx # Enable 3Dfx Voodoo support #XXX#device tdfx_linux # Enable Linuxulator support # # ACPI support using the Intel ACPI Component Architecture reference # implementation. # # ACPI_DEBUG enables the use of the debug.acpi.level and debug.acpi.layer # kernel environment variables to select initial debugging levels for the # Intel ACPICA code. (Note that the Intel code must also have USE_DEBUGGER # defined when it is built). device acpi options ACPI_DEBUG # The cpufreq(4) driver provides support for non-ACPI CPU frequency control device cpufreq # # Network interfaces: # # bxe: Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet # adapters. # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter # Requires the ipw firmware module # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters # Requires the iwi firmware module # iwn: Intel Wireless WiFi Link 1000/105/135/2000/4965/5000/6000/6050 abgn # 802.11 network adapters # Requires the iwn firmware module # mthca: Mellanox HCA InfiniBand # mlx4ib: Mellanox ConnectX HCA InfiniBand # mlx4en: Mellanox ConnectX HCA Ethernet # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # sfxge: Solarflare SFC9000 family 10Gb Ethernet adapters # vmx: VMware VMXNET3 Ethernet (BSD open source) # wpi: Intel 3945ABG Wireless LAN controller # Requires the wpi firmware module device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE options ED_3C503 options ED_HPP options ED_SIC device ipw # Intel 2100 wireless NICs. device iwi # Intel 2200BG/2225BG/2915ABG wireless NICs. device iwn # Intel 4965/1000/5000/6000 wireless NICs. device ixl # Intel 700 Series Physical Function device iavf # Intel Adaptive Virtual Function device mthca # Mellanox HCA InfiniBand device mlx4 # Shared code module between IB and Ethernet device mlx4ib # Mellanox ConnectX HCA InfiniBand device mlx4en # Mellanox ConnectX HCA Ethernet device nfe # nVidia nForce MCP on-board Ethernet device sfxge # Solarflare SFC9000 10Gb Ethernet device vmx # VMware VMXNET3 Ethernet device wpi # Intel 3945ABG wireless NICs. # IEEE 802.11 adapter firmware modules # Intel PRO/Wireless 2100 firmware: # ipwfw: BSS/IBSS/monitor mode firmware # ipwbssfw: BSS mode firmware # ipwibssfw: IBSS mode firmware # ipwmonitorfw: Monitor mode firmware # Intel PRO/Wireless 2200BG/2225BG/2915ABG firmware: # iwifw: BSS/IBSS/monitor mode firmware # iwibssfw: BSS mode firmware # iwiibssfw: IBSS mode firmware # iwimonitorfw: Monitor mode firmware # Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: # iwnfw: Single module to support all devices # iwn1000fw: Specific module for the 1000 only # iwn105fw: Specific module for the 105 only # iwn135fw: Specific module for the 135 only # iwn2000fw: Specific module for the 2000 only # iwn2030fw: Specific module for the 2030 only # iwn4965fw: Specific module for the 4965 only # iwn5000fw: Specific module for the 5000 only # iwn5150fw: Specific module for the 5150 only # iwn6000fw: Specific module for the 6000 only # iwn6000g2afw: Specific module for the 6000g2a only # iwn6000g2bfw: Specific module for the 6000g2b only # iwn6050fw: Specific module for the 6050 only # wpifw: Intel 3945ABG Wireless LAN Controller firmware device iwifw device iwibssfw device iwiibssfw device iwimonitorfw device ipwfw device ipwbssfw device ipwibssfw device ipwmonitorfw device iwnfw device iwn1000fw device iwn105fw device iwn135fw device iwn2000fw device iwn2030fw device iwn4965fw device iwn5000fw device iwn5150fw device iwn6000fw device iwn6000g2afw device iwn6000g2bfw device iwn6050fw device wpifw # # Non-Transparent Bridge (NTB) drivers # device if_ntb # Virtual NTB network interface device ntb_transport # NTB packet transport driver device ntb # NTB hardware interface device ntb_hw_amd # AMD NTB hardware driver device ntb_hw_intel # Intel NTB hardware driver device ntb_hw_plx # PLX NTB hardware driver # #XXX this stores pointers in a 32bit field that is defined by the hardware #device pst # # Areca 11xx and 12xx series of SATA II RAID controllers. # CAM is required. # device arcmsr # Areca SATA II RAID # # Microsemi smartpqi controllers. # These controllers have a SCSI-like interface, and require the # CAM infrastructure. # device smartpqi # # 3ware 9000 series PATA/SATA RAID controller driver and options. # The driver is implemented as a SIM, and so, needs the CAM infrastructure. # options TWA_DEBUG # 0-10; 10 prints the most messages. device twa # 3ware 9000 series PATA/SATA RAID # # Adaptec FSA RAID controllers, including integrated DELL controllers, # the Dell PERC 2/QC and the HP NetRAID-4M device aac device aacp # SCSI Passthrough interface (optional, CAM required) # # Adaptec by PMC RAID controllers, Series 6/7/8 and upcoming families device aacraid # Container interface, CAM required # # Highpoint RocketRAID 27xx. device hpt27xx # # Highpoint RocketRAID 182x. device hptmv # # Highpoint DC7280 and R750. device hptnr # # Highpoint RocketRAID. Supports RR172x, RR222x, RR2240, RR232x, RR2340, # RR2210, RR174x, RR2522, RR231x, RR230x. device hptrr # # Highpoint RocketRaid 3xxx series SATA RAID device hptiop # # IBM (now Adaptec) ServeRAID controllers device ips # # Intel integrated Memory Controller (iMC) SMBus controller # Sandybridge-Xeon, Ivybridge-Xeon, Haswell-Xeon, Broadwell-Xeon device imcsmb # # Intel C600 (Patsburg) integrated SAS controller device isci options ISCI_LOGGING # enable debugging in isci HAL # # NVM Express (NVMe) support device nvme # base NVMe driver device nvd # expose NVMe namespaces as disks, depends on nvme # # PMC-Sierra SAS/SATA controller device pmspcv # # SafeNet crypto driver: can be moved to the MI NOTES as soon as # it's tested on a big-endian machine # device safe # SafeNet 1141 options SAFE_DEBUG # enable debugging support: hw.safe.debug options SAFE_RNDTEST # enable rndtest support # # VirtIO support # # The virtio entry provides a generic bus for use by the device drivers. # It must be combined with an interface that communicates with the host. # Multiple such interfaces are defined by the VirtIO specification. FreeBSD # only has support for PCI. Therefore, virtio_pci must be statically # compiled in or loaded as a module for the device drivers to function. # device virtio # Generic VirtIO bus (required) device virtio_pci # VirtIO PCI Interface device vtnet # VirtIO Ethernet device device virtio_blk # VirtIO Block device device virtio_scsi # VirtIO SCSI device device virtio_balloon # VirtIO Memory Balloon device device virtio_random # VirtIO Entropy device device virtio_console # VirtIO Console device # Microsoft Hyper-V enhancement support device hyperv # HyperV drivers # Xen HVM Guest Optimizations options XENHVM # Xen HVM kernel infrastructure device xenpci # Xen HVM Hypervisor services driver ##################################################################### # # Miscellaneous hardware: # # ipmi: Intelligent Platform Management Interface # pbio: Parallel (8255 PPI) basic I/O (mode 0) port (e.g. Advantech PCL-724) # smbios: DMI/SMBIOS entry point # vpd: Vital Product Data kernel interface # asmc: Apple System Management Controller # si: Specialix International SI/XIO or SX intelligent serial card # tpm: Trusted Platform Module # Notes on the Specialix SI/XIO driver: # The host card is memory, not IO mapped. # The Rev 1 host cards use a 64K chunk, on a 32K boundary. # The Rev 2 host cards use a 32K chunk, on a 32K boundary. # The cards can use an IRQ of 11, 12 or 15. device ipmi device pbio hint.pbio.0.at="isa" hint.pbio.0.port="0x360" device smbios device vpd device asmc device tpm device padlock_rng # VIA Padlock RNG device rdrand_rng # Intel Bull Mountain RNG device aesni # AES-NI OpenCrypto module device ioat # Intel I/OAT DMA engine # # Laptop/Notebook options: # # # I2C Bus # # # Hardware watchdog timers: # # ichwd: Intel ICH watchdog timer # amdsbwd: AMD SB7xx watchdog timer # viawd: VIA south bridge watchdog timer # wbwd: Winbond watchdog timer # device ichwd device amdsbwd device viawd device wbwd # # Temperature sensors: # # coretemp: on-die sensor on Intel Core and newer CPUs # amdtemp: on-die sensor on AMD K8/K10/K11 CPUs # device coretemp device amdtemp # # CPU control pseudo-device. Provides access to MSRs, CPUID info and # microcode update feature. # device cpuctl # # SuperIO driver. # device superio # # System Management Bus (SMB) # options ENABLE_ALART # Control alarm on Intel intpm driver # # AMD System Management Network (SMN) # device amdsmn # # Number of initial kernel page table pages used for early bootstrap. # This number should include enough pages to map the kernel and any # modules or other data loaded with the kernel by the loader. Each # page table page maps 2MB. # options NKPT=31 # EFI Runtime Services support options EFIRT ##################################################################### # ABI Emulation #XXX keep these here for now and reactivate when support for emulating #XXX these 32 bit binaries is added. # Enable 32-bit runtime support for FreeBSD/i386 binaries. options COMPAT_FREEBSD32 # Enable (32-bit) a.out binary support options COMPAT_AOUT # Enable 32-bit runtime support for CloudABI binaries. options COMPAT_CLOUDABI32 # Enable 64-bit runtime support for CloudABI binaries. options COMPAT_CLOUDABI64 # Enable Linux ABI emulation #XXX#options COMPAT_LINUX # Enable 32-bit Linux ABI emulation (requires COMPAT_FREEBSD32). options COMPAT_LINUX32 # Enable the linux-like proc filesystem support (requires COMPAT_LINUX32 # and PSEUDOFS) options LINPROCFS #Enable the linux-like sys filesystem support (requires COMPAT_LINUX32 # and PSEUDOFS) options LINSYSFS ##################################################################### # ZFS support options ZFS ##################################################################### # VM OPTIONS # KSTACK_PAGES is the number of memory pages to assign to the kernel # stack of each thread. options KSTACK_PAGES=5 # Enable detailed accounting by the PV entry allocator. options PV_STATS ##################################################################### # More undocumented options for linting. # Note that documenting these are not considered an affront. options FB_INSTALL_CDEV # install a CDEV entry in /dev options KBDIO_DEBUG=2 options KBD_MAXRETRY=4 options KBD_MAXWAIT=6 options KBD_RESETDELAY=201 options PSM_DEBUG=1 options TIMER_FREQ=((14318182+6)/12) options VM_KMEM_SIZE options VM_KMEM_SIZE_MAX options VM_KMEM_SIZE_SCALE # Enable NDIS binary driver support options NDISAPI device ndis # GCOV (code coverage) support options LINDEBUGFS options GCOV + +options STATS Index: head/sys/conf/files =================================================================== --- head/sys/conf/files (revision 353282) +++ head/sys/conf/files (revision 353283) @@ -1,4951 +1,4952 @@ # $FreeBSD$ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and # dependency lines other than the first are silently ignored. # acpi_quirks.h optional acpi \ dependency "$S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ compile-with "${AWK} -f $S/tools/acpi_quirks2h.awk $S/dev/acpica/acpi_quirks" \ no-obj no-implicit-rule before-depend \ clean "acpi_quirks.h" bhnd_nvram_map.h optional bhnd \ dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -h" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map.h" bhnd_nvram_map_data.h optional bhnd \ dependency "$S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/tools/nvram_map_gen.awk $S/dev/bhnd/nvram/nvram_map" \ compile-with "sh $S/dev/bhnd/tools/nvram_map_gen.sh $S/dev/bhnd/nvram/nvram_map -d" \ no-obj no-implicit-rule before-depend \ clean "bhnd_nvram_map_data.h" fdt_static_dtb.h optional fdt fdt_dtb_static \ compile-with "sh -c 'MACHINE=${MACHINE} $S/tools/fdt/make_dtbh.sh ${FDT_DTS_FILE} ${.CURDIR}'" \ dependency "${FDT_DTS_FILE:T:R}.dtb" \ no-obj no-implicit-rule before-depend \ clean "fdt_static_dtb.h" feeder_eq_gen.h optional sound \ dependency "$S/tools/sound/feeder_eq_mkfilter.awk" \ compile-with "${AWK} -f $S/tools/sound/feeder_eq_mkfilter.awk -- ${FEEDER_EQ_PRESETS} > feeder_eq_gen.h" \ no-obj no-implicit-rule before-depend \ clean "feeder_eq_gen.h" feeder_rate_gen.h optional sound \ dependency "$S/tools/sound/feeder_rate_mkfilter.awk" \ compile-with "${AWK} -f $S/tools/sound/feeder_rate_mkfilter.awk -- ${FEEDER_RATE_PRESETS} > feeder_rate_gen.h" \ no-obj no-implicit-rule before-depend \ clean "feeder_rate_gen.h" snd_fxdiv_gen.h optional sound \ dependency "$S/tools/sound/snd_fxdiv_gen.awk" \ compile-with "${AWK} -f $S/tools/sound/snd_fxdiv_gen.awk -- > snd_fxdiv_gen.h" \ no-obj no-implicit-rule before-depend \ clean "snd_fxdiv_gen.h" miidevs.h optional miibus | mii \ dependency "$S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ compile-with "${AWK} -f $S/tools/miidevs2h.awk $S/dev/mii/miidevs" \ no-obj no-implicit-rule before-depend \ clean "miidevs.h" pccarddevs.h standard \ dependency "$S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" kbdmuxmap.h optional kbdmux_dflt_keymap \ compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${KBDMUX_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > kbdmuxmap.h" \ no-obj no-implicit-rule before-depend \ clean "kbdmuxmap.h" teken_state.h optional sc | vt \ dependency "$S/teken/gensequences $S/teken/sequences" \ compile-with "${AWK} -f $S/teken/gensequences $S/teken/sequences > teken_state.h" \ no-obj no-implicit-rule before-depend \ clean "teken_state.h" ukbdmap.h optional ukbd_dflt_keymap \ compile-with "kbdcontrol -P ${S:S/sys$/share/}/vt/keymaps -P ${S:S/sys$/share/}/syscons/keymaps -L ${UKBD_DFLT_KEYMAP} | sed -e 's/^static keymap_t.* = /static keymap_t key_map = /' -e 's/^static accentmap_t.* = /static accentmap_t accent_map = /' > ukbdmap.h" \ no-obj no-implicit-rule before-depend \ clean "ukbdmap.h" usbdevs.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ no-obj no-implicit-rule before-depend \ clean "usbdevs.h" usbdevs_data.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -d" \ no-obj no-implicit-rule before-depend \ clean "usbdevs_data.h" sdiodevs.h optional mmccam \ dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -h" \ no-obj no-implicit-rule before-depend \ clean "sdiodevs.h" sdiodevs_data.h optional mmccam \ dependency "$S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs" \ compile-with "${AWK} -f $S/tools/sdiodevs2h.awk $S/dev/sdio/sdiodevs -d" \ no-obj no-implicit-rule before-depend \ clean "sdiodevs_data.h" cam/cam.c optional scbus cam/cam_compat.c optional scbus cam/cam_iosched.c optional scbus cam/cam_periph.c optional scbus cam/cam_queue.c optional scbus cam/cam_sim.c optional scbus cam/cam_xpt.c optional scbus cam/ata/ata_all.c optional scbus cam/ata/ata_xpt.c optional scbus cam/ata/ata_pmp.c optional scbus cam/nvme/nvme_all.c optional scbus cam/nvme/nvme_da.c optional nda | da cam/nvme/nvme_xpt.c optional scbus cam/scsi/scsi_xpt.c optional scbus cam/scsi/scsi_all.c optional scbus cam/scsi/scsi_cd.c optional cd cam/scsi/scsi_ch.c optional ch cam/ata/ata_da.c optional ada | da cam/ctl/ctl.c optional ctl cam/ctl/ctl_backend.c optional ctl cam/ctl/ctl_backend_block.c optional ctl cam/ctl/ctl_backend_ramdisk.c optional ctl cam/ctl/ctl_cmd_table.c optional ctl cam/ctl/ctl_frontend.c optional ctl cam/ctl/ctl_frontend_cam_sim.c optional ctl cam/ctl/ctl_frontend_ioctl.c optional ctl cam/ctl/ctl_frontend_iscsi.c optional ctl cfiscsi cam/ctl/ctl_ha.c optional ctl cam/ctl/ctl_scsi_all.c optional ctl cam/ctl/ctl_tpc.c optional ctl cam/ctl/ctl_tpc_local.c optional ctl cam/ctl/ctl_error.c optional ctl cam/ctl/ctl_util.c optional ctl cam/ctl/scsi_ctl.c optional ctl cam/mmc/mmc_xpt.c optional scbus mmccam cam/mmc/mmc_da.c optional scbus mmccam da cam/scsi/scsi_da.c optional da cam/scsi/scsi_pass.c optional pass cam/scsi/scsi_pt.c optional pt cam/scsi/scsi_sa.c optional sa cam/scsi/scsi_enc.c optional ses cam/scsi/scsi_enc_ses.c optional ses cam/scsi/scsi_enc_safte.c optional ses cam/scsi/scsi_sg.c optional sg cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ cam/scsi/smp_all.c optional scbus # shared between zfs and dtrace cddl/compat/opensolaris/kern/opensolaris.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_cmn_err.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_kmem.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_misc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_proc.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_sunddi.c optional zfs | dtrace compile-with "${CDDL_C}" cddl/compat/opensolaris/kern/opensolaris_taskq.c optional zfs | dtrace compile-with "${CDDL_C}" # zfs specific cddl/compat/opensolaris/kern/opensolaris_acl.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_dtrace.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kobj.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_kstat.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_lookup.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_policy.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_string.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_sysevent.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_uio.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vfs.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_vm.c optional zfs compile-with "${ZFS_C}" cddl/compat/opensolaris/kern/opensolaris_zone.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/acl/acl_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/avl/avl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_fnvpair.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair_alloc_fixed.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/unicode/u8_textprep.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfeature_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_comutil.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_deleg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_fletcher.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zfs_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zpool_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/common/zfs/zprop_common.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/vnode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/aggsum.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/blkptr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bplist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/cityhash.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf_stats.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/ddt_zap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_zfetch.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c optional zfs compile-with "${ZFS_C}" \ warning "kernel contains CDDL licensed ZFS filesystem" cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/gzip.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lz4.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lzjb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/multilist.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/range_tree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/rrwlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/sha256.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/skein_zfs.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_checkpoint.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/space_reftree.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/unique.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_births.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_indirect_mapping.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_initialize.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_removal.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_get.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_global.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_iter.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zcp_synctask.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_byteswap.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_debug.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_rlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_sa.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zle.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zrlock.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zthr.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/callb.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/fm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/list.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/os/nvpair_alloc_system.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/zmod/zmod.c optional zfs compile-with "${ZFS_C}" # zfs lua support cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lapi.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lauxlib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lbaselib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lbitlib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lcode.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lcompat.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lcorolib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lctype.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ldebug.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ldo.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ldump.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lfunc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lgc.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/llex.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lmem.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lobject.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lopcodes.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lparser.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstate.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstring.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lstrlib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltable.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltablib.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/ltm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lundump.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lvm.c optional zfs compile-with "${ZFS_C}" cddl/contrib/opensolaris/uts/common/fs/zfs/lua/lzio.c optional zfs compile-with "${ZFS_C}" # dtrace specific cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c optional dtrace compile-with "${DTRACE_C}" \ warning "kernel contains CDDL licensed DTRACE" cddl/contrib/opensolaris/uts/common/dtrace/dtrace_xoroshiro128_plus.c optional dtrace compile-with "${DTRACE_C}" cddl/dev/dtmalloc/dtmalloc.c optional dtmalloc | dtraceall compile-with "${CDDL_C}" cddl/dev/profile/profile.c optional dtrace_profile | dtraceall compile-with "${CDDL_C}" cddl/dev/sdt/sdt.c optional dtrace_sdt | dtraceall compile-with "${CDDL_C}" cddl/dev/fbt/fbt.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}" cddl/dev/systrace/systrace.c optional dtrace_systrace | dtraceall compile-with "${CDDL_C}" cddl/dev/prototype.c optional dtrace_prototype | dtraceall compile-with "${CDDL_C}" fs/nfsclient/nfs_clkdtrace.c optional dtnfscl nfscl | dtraceall nfscl compile-with "${CDDL_C}" compat/cloudabi/cloudabi_clock.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_errno.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_fd.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_file.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_futex.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_mem.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_proc.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_random.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_sock.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_thread.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi/cloudabi_vdso.c optional compat_cloudabi32 | compat_cloudabi64 compat/cloudabi32/cloudabi32_fd.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_module.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_poll.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_sock.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_syscalls.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_sysent.c optional compat_cloudabi32 compat/cloudabi32/cloudabi32_thread.c optional compat_cloudabi32 compat/cloudabi64/cloudabi64_fd.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_module.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_poll.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sock.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_syscalls.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_sysent.c optional compat_cloudabi64 compat/cloudabi64/cloudabi64_thread.c optional compat_cloudabi64 compat/freebsd32/freebsd32_capability.c optional compat_freebsd32 compat/freebsd32/freebsd32_ioctl.c optional compat_freebsd32 compat/freebsd32/freebsd32_misc.c optional compat_freebsd32 compat/freebsd32/freebsd32_syscalls.c optional compat_freebsd32 compat/freebsd32/freebsd32_sysent.c optional compat_freebsd32 contrib/ck/src/ck_array.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_centralized.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_combining.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_dissemination.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_mcs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_barrier_tournament.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_epoch.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_hp.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_hs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_ht.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/ck/src/ck_rhs.c standard compile-with "${NORMAL_C} -I$S/contrib/ck/include" contrib/dev/acpica/common/ahids.c optional acpi acpi_debug contrib/dev/acpica/common/ahuuids.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbconvert.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbobject.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbtest.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmcstyle.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmdeferred.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmresrcs.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmutils.c optional acpi acpi_debug contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi contrib/dev/acpica/components/dispatcher/dsdebug.c optional acpi contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi contrib/dev/acpica/components/dispatcher/dspkginit.c optional acpi contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi contrib/dev/acpica/components/dispatcher/dswload.c optional acpi contrib/dev/acpica/components/dispatcher/dswload2.c optional acpi contrib/dev/acpica/components/dispatcher/dswscope.c optional acpi contrib/dev/acpica/components/dispatcher/dswstate.c optional acpi contrib/dev/acpica/components/events/evevent.c optional acpi contrib/dev/acpica/components/events/evglock.c optional acpi contrib/dev/acpica/components/events/evgpe.c optional acpi contrib/dev/acpica/components/events/evgpeblk.c optional acpi contrib/dev/acpica/components/events/evgpeinit.c optional acpi contrib/dev/acpica/components/events/evgpeutil.c optional acpi contrib/dev/acpica/components/events/evhandler.c optional acpi contrib/dev/acpica/components/events/evmisc.c optional acpi contrib/dev/acpica/components/events/evregion.c optional acpi contrib/dev/acpica/components/events/evrgnini.c optional acpi contrib/dev/acpica/components/events/evsci.c optional acpi contrib/dev/acpica/components/events/evxface.c optional acpi contrib/dev/acpica/components/events/evxfevnt.c optional acpi contrib/dev/acpica/components/events/evxfgpe.c optional acpi contrib/dev/acpica/components/events/evxfregn.c optional acpi contrib/dev/acpica/components/executer/exconcat.c optional acpi contrib/dev/acpica/components/executer/exconfig.c optional acpi contrib/dev/acpica/components/executer/exconvrt.c optional acpi contrib/dev/acpica/components/executer/excreate.c optional acpi contrib/dev/acpica/components/executer/exdebug.c optional acpi contrib/dev/acpica/components/executer/exdump.c optional acpi contrib/dev/acpica/components/executer/exfield.c optional acpi contrib/dev/acpica/components/executer/exfldio.c optional acpi contrib/dev/acpica/components/executer/exmisc.c optional acpi contrib/dev/acpica/components/executer/exmutex.c optional acpi contrib/dev/acpica/components/executer/exnames.c optional acpi contrib/dev/acpica/components/executer/exoparg1.c optional acpi contrib/dev/acpica/components/executer/exoparg2.c optional acpi contrib/dev/acpica/components/executer/exoparg3.c optional acpi contrib/dev/acpica/components/executer/exoparg6.c optional acpi contrib/dev/acpica/components/executer/exprep.c optional acpi contrib/dev/acpica/components/executer/exregion.c optional acpi contrib/dev/acpica/components/executer/exresnte.c optional acpi contrib/dev/acpica/components/executer/exresolv.c optional acpi contrib/dev/acpica/components/executer/exresop.c optional acpi contrib/dev/acpica/components/executer/exserial.c optional acpi contrib/dev/acpica/components/executer/exstore.c optional acpi contrib/dev/acpica/components/executer/exstoren.c optional acpi contrib/dev/acpica/components/executer/exstorob.c optional acpi contrib/dev/acpica/components/executer/exsystem.c optional acpi contrib/dev/acpica/components/executer/extrace.c optional acpi contrib/dev/acpica/components/executer/exutils.c optional acpi contrib/dev/acpica/components/hardware/hwacpi.c optional acpi contrib/dev/acpica/components/hardware/hwesleep.c optional acpi contrib/dev/acpica/components/hardware/hwgpe.c optional acpi contrib/dev/acpica/components/hardware/hwpci.c optional acpi contrib/dev/acpica/components/hardware/hwregs.c optional acpi contrib/dev/acpica/components/hardware/hwsleep.c optional acpi contrib/dev/acpica/components/hardware/hwtimer.c optional acpi contrib/dev/acpica/components/hardware/hwvalid.c optional acpi contrib/dev/acpica/components/hardware/hwxface.c optional acpi contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi contrib/dev/acpica/components/namespace/nsaccess.c optional acpi contrib/dev/acpica/components/namespace/nsalloc.c optional acpi contrib/dev/acpica/components/namespace/nsarguments.c optional acpi contrib/dev/acpica/components/namespace/nsconvert.c optional acpi contrib/dev/acpica/components/namespace/nsdump.c optional acpi contrib/dev/acpica/components/namespace/nseval.c optional acpi contrib/dev/acpica/components/namespace/nsinit.c optional acpi contrib/dev/acpica/components/namespace/nsload.c optional acpi contrib/dev/acpica/components/namespace/nsnames.c optional acpi contrib/dev/acpica/components/namespace/nsobject.c optional acpi contrib/dev/acpica/components/namespace/nsparse.c optional acpi contrib/dev/acpica/components/namespace/nspredef.c optional acpi contrib/dev/acpica/components/namespace/nsprepkg.c optional acpi contrib/dev/acpica/components/namespace/nsrepair.c optional acpi contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi contrib/dev/acpica/components/namespace/nssearch.c optional acpi contrib/dev/acpica/components/namespace/nsutils.c optional acpi contrib/dev/acpica/components/namespace/nswalk.c optional acpi contrib/dev/acpica/components/namespace/nsxfeval.c optional acpi contrib/dev/acpica/components/namespace/nsxfname.c optional acpi contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi contrib/dev/acpica/components/parser/psargs.c optional acpi contrib/dev/acpica/components/parser/psloop.c optional acpi contrib/dev/acpica/components/parser/psobject.c optional acpi contrib/dev/acpica/components/parser/psopcode.c optional acpi contrib/dev/acpica/components/parser/psopinfo.c optional acpi contrib/dev/acpica/components/parser/psparse.c optional acpi contrib/dev/acpica/components/parser/psscope.c optional acpi contrib/dev/acpica/components/parser/pstree.c optional acpi contrib/dev/acpica/components/parser/psutils.c optional acpi contrib/dev/acpica/components/parser/pswalk.c optional acpi contrib/dev/acpica/components/parser/psxface.c optional acpi contrib/dev/acpica/components/resources/rsaddr.c optional acpi contrib/dev/acpica/components/resources/rscalc.c optional acpi contrib/dev/acpica/components/resources/rscreate.c optional acpi contrib/dev/acpica/components/resources/rsdump.c optional acpi acpi_debug contrib/dev/acpica/components/resources/rsdumpinfo.c optional acpi contrib/dev/acpica/components/resources/rsinfo.c optional acpi contrib/dev/acpica/components/resources/rsio.c optional acpi contrib/dev/acpica/components/resources/rsirq.c optional acpi contrib/dev/acpica/components/resources/rslist.c optional acpi contrib/dev/acpica/components/resources/rsmemory.c optional acpi contrib/dev/acpica/components/resources/rsmisc.c optional acpi contrib/dev/acpica/components/resources/rsserial.c optional acpi contrib/dev/acpica/components/resources/rsutils.c optional acpi contrib/dev/acpica/components/resources/rsxface.c optional acpi contrib/dev/acpica/components/tables/tbdata.c optional acpi contrib/dev/acpica/components/tables/tbfadt.c optional acpi contrib/dev/acpica/components/tables/tbfind.c optional acpi contrib/dev/acpica/components/tables/tbinstal.c optional acpi contrib/dev/acpica/components/tables/tbprint.c optional acpi contrib/dev/acpica/components/tables/tbutils.c optional acpi contrib/dev/acpica/components/tables/tbxface.c optional acpi contrib/dev/acpica/components/tables/tbxfload.c optional acpi contrib/dev/acpica/components/tables/tbxfroot.c optional acpi contrib/dev/acpica/components/utilities/utaddress.c optional acpi contrib/dev/acpica/components/utilities/utalloc.c optional acpi contrib/dev/acpica/components/utilities/utascii.c optional acpi contrib/dev/acpica/components/utilities/utbuffer.c optional acpi contrib/dev/acpica/components/utilities/utcache.c optional acpi contrib/dev/acpica/components/utilities/utcopy.c optional acpi contrib/dev/acpica/components/utilities/utdebug.c optional acpi contrib/dev/acpica/components/utilities/utdecode.c optional acpi contrib/dev/acpica/components/utilities/utdelete.c optional acpi contrib/dev/acpica/components/utilities/uterror.c optional acpi contrib/dev/acpica/components/utilities/uteval.c optional acpi contrib/dev/acpica/components/utilities/utexcep.c optional acpi contrib/dev/acpica/components/utilities/utglobal.c optional acpi contrib/dev/acpica/components/utilities/uthex.c optional acpi contrib/dev/acpica/components/utilities/utids.c optional acpi contrib/dev/acpica/components/utilities/utinit.c optional acpi contrib/dev/acpica/components/utilities/utlock.c optional acpi contrib/dev/acpica/components/utilities/utmath.c optional acpi contrib/dev/acpica/components/utilities/utmisc.c optional acpi contrib/dev/acpica/components/utilities/utmutex.c optional acpi contrib/dev/acpica/components/utilities/utnonansi.c optional acpi contrib/dev/acpica/components/utilities/utobject.c optional acpi contrib/dev/acpica/components/utilities/utosi.c optional acpi contrib/dev/acpica/components/utilities/utownerid.c optional acpi contrib/dev/acpica/components/utilities/utpredef.c optional acpi contrib/dev/acpica/components/utilities/utresdecode.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi contrib/dev/acpica/components/utilities/utstrsuppt.c optional acpi contrib/dev/acpica/components/utilities/utstrtoul64.c optional acpi contrib/dev/acpica/components/utilities/utuuid.c optional acpi acpi_debug contrib/dev/acpica/components/utilities/utxface.c optional acpi contrib/dev/acpica/components/utilities/utxferror.c optional acpi contrib/dev/acpica/components/utilities/utxfinit.c optional acpi contrib/dev/acpica/os_specific/service_layers/osgendbg.c optional acpi acpi_debug contrib/ipfilter/netinet/fil.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_frag.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_log.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-unused -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter ${NO_WTAUTOLOGICAL_POINTER_COMPARE}" contrib/ipfilter/netinet/ip_sync.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/mlfk_ipl.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_nat6.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_rules.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_scan.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_dstlist.c optional ipfilter inet \ compile-with "${NORMAL_C} -Wno-unused -I$S/contrib/ipfilter" contrib/ipfilter/netinet/radix_ipf.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/libfdt/fdt.c optional fdt contrib/libfdt/fdt_ro.c optional fdt contrib/libfdt/fdt_rw.c optional fdt contrib/libfdt/fdt_strerror.c optional fdt contrib/libfdt/fdt_sw.c optional fdt contrib/libfdt/fdt_wip.c optional fdt contrib/libnv/cnvlist.c standard contrib/libnv/dnvlist.c standard contrib/libnv/nvlist.c standard contrib/libnv/nvpair.c standard contrib/ngatm/netnatm/api/cc_conn.c optional ngatm_ccatm \ compile-with "${NORMAL_C_NOWERROR} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_data.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_dump.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_port.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_sig.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/cc_user.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/api/unisap.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/misc/straddr.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/misc/unimsg_common.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/traffic.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/uni_ie.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/msg/uni_msg.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/saal/saal_sscfu.c optional ngatm_sscfu \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/saal/saal_sscop.c optional ngatm_sscop \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_call.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_coord.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_party.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_print.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_reset.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_uni.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_unimsgcpy.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" contrib/ngatm/netnatm/sig/sig_verify.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" # xz dev/xz/xz_mod.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_crc32.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_bcj.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_lzma2.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" contrib/xz-embedded/linux/lib/xz/xz_dec_stream.c optional xz \ compile-with "${NORMAL_C} -I$S/contrib/xz-embedded/freebsd/ -I$S/contrib/xz-embedded/linux/lib/xz/ -I$S/contrib/xz-embedded/linux/include/linux/" # Zstd contrib/zstd/lib/freebsd/zstd_kmalloc.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/zstd_common.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/fse_decompress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/entropy_common.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/error_private.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/common/xxhash.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_compress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_compress_literals.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_compress_sequences.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/fse_compress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/hist.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/huf_compress.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_double_fast.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_fast.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_lazy.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_ldm.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/compress/zstd_opt.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/decompress/zstd_ddict.c optional zstdio compile-with ${ZSTD_C} contrib/zstd/lib/decompress/zstd_decompress.c optional zstdio compile-with ${ZSTD_C} # See comment in sys/conf/kern.pre.mk contrib/zstd/lib/decompress/zstd_decompress_block.c optional zstdio \ compile-with "${ZSTD_C} ${ZSTD_DECOMPRESS_BLOCK_FLAGS}" contrib/zstd/lib/decompress/huf_decompress.c optional zstdio compile-with ${ZSTD_C} # Blake 2 contrib/libb2/blake2b-ref.c optional crypto | ipsec | ipsec_support \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" contrib/libb2/blake2s-ref.c optional crypto | ipsec | ipsec_support \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual -DSUFFIX=_ref -Wno-unused-function" crypto/blake2/blake2-sw.c optional crypto | ipsec | ipsec_support \ compile-with "${NORMAL_C} -I$S/crypto/blake2 -Wno-cast-qual" crypto/blowfish/bf_ecb.c optional ipsec | ipsec_support crypto/blowfish/bf_skey.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia.c optional crypto | ipsec | ipsec_support crypto/camellia/camellia-api.c optional crypto | ipsec | ipsec_support crypto/chacha20/chacha.c standard crypto/chacha20/chacha-sw.c optional crypto | ipsec | ipsec_support crypto/des/des_ecb.c optional crypto | ipsec | ipsec_support | netsmb crypto/des/des_setkey.c optional crypto | ipsec | ipsec_support | netsmb crypto/rc4/rc4.c optional netgraph_mppc_encryption | kgssapi crypto/rijndael/rijndael-alg-fst.c optional crypto | ekcd | geom_bde | \ ipsec | ipsec_support | !random_loadable | wlan_ccmp crypto/rijndael/rijndael-api-fst.c optional ekcd | geom_bde | !random_loadable crypto/rijndael/rijndael-api.c optional crypto | ipsec | ipsec_support | \ wlan_ccmp crypto/sha1.c optional carp | crypto | ether | ipsec | \ ipsec_support | netgraph_mppc_encryption | sctp crypto/sha2/sha256c.c optional crypto | ekcd | geom_bde | ipsec | \ ipsec_support | !random_loadable | sctp | zfs crypto/sha2/sha512c.c optional crypto | geom_bde | ipsec | \ ipsec_support | zfs crypto/skein/skein.c optional crypto | zfs crypto/skein/skein_block.c optional crypto | zfs crypto/siphash/siphash.c optional inet | inet6 crypto/siphash/siphash_test.c optional inet | inet6 ddb/db_access.c optional ddb ddb/db_break.c optional ddb ddb/db_capture.c optional ddb ddb/db_command.c optional ddb ddb/db_examine.c optional ddb ddb/db_expr.c optional ddb ddb/db_input.c optional ddb ddb/db_lex.c optional ddb ddb/db_main.c optional ddb ddb/db_output.c optional ddb ddb/db_print.c optional ddb ddb/db_ps.c optional ddb ddb/db_run.c optional ddb ddb/db_script.c optional ddb ddb/db_sym.c optional ddb ddb/db_thread.c optional ddb ddb/db_textdump.c optional ddb ddb/db_variables.c optional ddb ddb/db_watch.c optional ddb ddb/db_write_cmd.c optional ddb dev/aac/aac.c optional aac dev/aac/aac_cam.c optional aacp aac dev/aac/aac_debug.c optional aac dev/aac/aac_disk.c optional aac dev/aac/aac_linux.c optional aac compat_linux dev/aac/aac_pci.c optional aac pci dev/aacraid/aacraid.c optional aacraid dev/aacraid/aacraid_cam.c optional aacraid scbus dev/aacraid/aacraid_debug.c optional aacraid dev/aacraid/aacraid_linux.c optional aacraid compat_linux dev/aacraid/aacraid_pci.c optional aacraid pci dev/acpi_support/acpi_wmi.c optional acpi_wmi acpi dev/acpi_support/acpi_asus.c optional acpi_asus acpi dev/acpi_support/acpi_asus_wmi.c optional acpi_asus_wmi acpi dev/acpi_support/acpi_fujitsu.c optional acpi_fujitsu acpi dev/acpi_support/acpi_hp.c optional acpi_hp acpi dev/acpi_support/acpi_ibm.c optional acpi_ibm acpi dev/acpi_support/acpi_panasonic.c optional acpi_panasonic acpi dev/acpi_support/acpi_sony.c optional acpi_sony acpi dev/acpi_support/acpi_toshiba.c optional acpi_toshiba acpi dev/acpi_support/atk0110.c optional aibs acpi dev/acpica/Osd/OsdDebug.c optional acpi dev/acpica/Osd/OsdHardware.c optional acpi dev/acpica/Osd/OsdInterrupt.c optional acpi dev/acpica/Osd/OsdMemory.c optional acpi dev/acpica/Osd/OsdSchedule.c optional acpi dev/acpica/Osd/OsdStream.c optional acpi dev/acpica/Osd/OsdSynch.c optional acpi dev/acpica/Osd/OsdTable.c optional acpi dev/acpica/acpi.c optional acpi dev/acpica/acpi_acad.c optional acpi dev/acpica/acpi_battery.c optional acpi dev/acpica/acpi_button.c optional acpi dev/acpica/acpi_cmbat.c optional acpi dev/acpica/acpi_cpu.c optional acpi dev/acpica/acpi_ec.c optional acpi dev/acpica/acpi_isab.c optional acpi isa dev/acpica/acpi_lid.c optional acpi dev/acpica/acpi_package.c optional acpi dev/acpica/acpi_perf.c optional acpi dev/acpica/acpi_powerres.c optional acpi dev/acpica/acpi_quirk.c optional acpi dev/acpica/acpi_resource.c optional acpi dev/acpica/acpi_container.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink dev/ae/if_ae.c optional ae pci dev/age/if_age.c optional age pci dev/agp/agp.c optional agp pci dev/agp/agp_if.m optional agp pci dev/ahci/ahci.c optional ahci dev/ahci/ahciem.c optional ahci dev/ahci/ahci_pci.c optional ahci pci dev/aic7xxx/ahc_isa.c optional ahc isa dev/aic7xxx/ahc_pci.c optional ahc pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/ahd_pci.c optional ahd pci \ compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/aic7xxx/aic7770.c optional ahc dev/aic7xxx/aic79xx.c optional ahd pci dev/aic7xxx/aic79xx_osm.c optional ahd pci dev/aic7xxx/aic79xx_pci.c optional ahd pci dev/aic7xxx/aic79xx_reg_print.c optional ahd pci ahd_reg_pretty_print dev/aic7xxx/aic7xxx.c optional ahc dev/aic7xxx/aic7xxx_93cx6.c optional ahc dev/aic7xxx/aic7xxx_osm.c optional ahc dev/aic7xxx/aic7xxx_pci.c optional ahc pci dev/aic7xxx/aic7xxx_reg_print.c optional ahc ahc_reg_pretty_print dev/al_eth/al_eth.c optional al_eth fdt \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/al_eth/al_init_eth_lm.c optional al_eth fdt \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/al_eth/al_init_eth_kr.c optional al_eth fdt \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_iofic.c optional al_iofic \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_serdes_25g.c optional al_serdes \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_serdes_hssp.c optional al_serdes \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_config.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_debug.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_iofic.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_hal_udma_main.c optional al_udma \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/al_serdes.c optional al_serdes \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/eth/al_hal_eth_kr.c optional al_eth \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" contrib/alpine-hal/eth/al_hal_eth_main.c optional al_eth \ no-depend \ compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}" dev/alc/if_alc.c optional alc pci dev/ale/if_ale.c optional ale pci dev/alpm/alpm.c optional alpm pci dev/altera/avgen/altera_avgen.c optional altera_avgen dev/altera/avgen/altera_avgen_fdt.c optional altera_avgen fdt dev/altera/avgen/altera_avgen_nexus.c optional altera_avgen dev/altera/msgdma/msgdma.c optional altera_msgdma xdma dev/altera/sdcard/altera_sdcard.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard dev/altera/sdcard/altera_sdcard_fdt.c optional altera_sdcard fdt dev/altera/sdcard/altera_sdcard_nexus.c optional altera_sdcard dev/altera/softdma/softdma.c optional altera_softdma xdma fdt dev/altera/pio/pio.c optional altera_pio dev/altera/pio/pio_if.m optional altera_pio dev/amdpm/amdpm.c optional amdpm pci | nfpm pci dev/amdsmb/amdsmb.c optional amdsmb pci dev/amr/amr.c optional amr dev/amr/amr_cam.c optional amrp amr dev/amr/amr_disk.c optional amr dev/amr/amr_linux.c optional amr compat_linux dev/amr/amr_pci.c optional amr pci dev/an/if_an.c optional an dev/an/if_an_isa.c optional an isa dev/an/if_an_pccard.c optional an pccard dev/an/if_an_pci.c optional an pci # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-dma.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-sata.c optional ata | atacore dev/ata/ata-card.c optional ata pccard | atapccard dev/ata/ata-isa.c optional ata isa | ataisa dev/ata/ata-pci.c optional ata pci | atapci dev/ata/chipsets/ata-acard.c optional ata pci | ataacard dev/ata/chipsets/ata-acerlabs.c optional ata pci | ataacerlabs dev/ata/chipsets/ata-amd.c optional ata pci | ataamd dev/ata/chipsets/ata-ati.c optional ata pci | ataati dev/ata/chipsets/ata-cenatek.c optional ata pci | atacenatek dev/ata/chipsets/ata-cypress.c optional ata pci | atacypress dev/ata/chipsets/ata-cyrix.c optional ata pci | atacyrix dev/ata/chipsets/ata-highpoint.c optional ata pci | atahighpoint dev/ata/chipsets/ata-intel.c optional ata pci | ataintel dev/ata/chipsets/ata-ite.c optional ata pci | ataite dev/ata/chipsets/ata-jmicron.c optional ata pci | atajmicron dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell dev/ata/chipsets/ata-micron.c optional ata pci | atamicron dev/ata/chipsets/ata-national.c optional ata pci | atanational dev/ata/chipsets/ata-netcell.c optional ata pci | atanetcell dev/ata/chipsets/ata-nvidia.c optional ata pci | atanvidia dev/ata/chipsets/ata-promise.c optional ata pci | atapromise dev/ata/chipsets/ata-serverworks.c optional ata pci | ataserverworks dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage | ataati dev/ata/chipsets/ata-sis.c optional ata pci | atasis dev/ata/chipsets/ata-via.c optional ata pci | atavia # dev/ath/if_ath_pci.c optional ath_pci pci \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/if_ath_ahb.c optional ath_ahb \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/if_ath.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_alq.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_beacon.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_btcoex_mci.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_descdma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_ioctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_led.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_lna_div.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_ht.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tdma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_sysctl.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_rx_edma.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_spectral.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ah_osdep.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/ath/ath_hal/ah.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v1.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v3.c optional ath_hal | ath_ar5211 | ath_ar5212 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v14.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_v4k.c \ optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_eeprom_9287.c \ optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_hal/ah_regdomain.c optional ath \ compile-with "${NORMAL_C} ${NO_WSHIFT_COUNT_NEGATIVE} ${NO_WSHIFT_COUNT_OVERFLOW} -I$S/dev/ath" # ar5210 dev/ath/ath_hal/ar5210/ar5210_attach.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_beacon.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_interrupts.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_keycache.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_misc.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_phy.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_power.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_recv.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_reset.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5210/ar5210_xmit.c optional ath_hal | ath_ar5210 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5211 dev/ath/ath_hal/ar5211/ar5211_attach.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_beacon.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_interrupts.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_keycache.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_misc.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_phy.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_power.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_recv.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_reset.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5211/ar5211_xmit.c optional ath_hal | ath_ar5211 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5212 dev/ath/ath_hal/ar5212/ar5212_ani.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_attach.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_beacon.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_eeprom.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_gpio.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_interrupts.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_keycache.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_misc.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_phy.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_power.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_recv.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_reset.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_rfgain.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5212_xmit.c \ optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \ ath_ar9285 ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar5416 (depends on ar5212) dev/ath/ath_hal/ar5416/ar5416_ani.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_attach.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_beacon.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_btcoex.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_iq.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_eeprom.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_gpio.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_interrupts.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_keycache.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_misc.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_phy.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_power.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_radar.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_recv.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_reset.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_spectral.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar5416_xmit.c \ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \ ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130 # # Since this is an embedded MAC SoC, there's no need to compile it into the # default HAL. dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9001/ar9130_phy.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9001/ar9130_eeprom.c optional ath_ar9130 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9160 (depends on ar5416) dev/ath/ath_hal/ar9001/ar9160_attach.c optional ath_hal | ath_ar9160 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9280 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9280_attach.c optional ath_hal | ath_ar9280 | \ ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280_olc.c optional ath_hal | ath_ar9280 | \ ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9285 (depends on ar5416 and ar9280) dev/ath/ath_hal/ar9002/ar9285_attach.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_btcoex.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_reset.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_cal.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_phy.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9287 (depends on ar5416) dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ar9300 contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_beacon.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal ${NO_WCONSTANT_CONVERSION}" contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_interrupts.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_keycache.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_mci.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_misc.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_paprd.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_phy.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_power.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_radar.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_recv.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_recv_ds.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal ${NO_WSOMETIMES_UNINITIALIZED} -Wno-unused-function" contrib/dev/ath/ath_hal/ar9300/ar9300_stub.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_stub_funcs.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_spectral.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_timer.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c optional ath_hal | ath_ar9300 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal -I$S/contrib/dev/ath/ath_hal" # rf backends dev/ath/ath_hal/ar5212/ar2316.c optional ath_rf2316 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2317.c optional ath_rf2317 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2413.c optional ath_hal | ath_rf2413 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar2425.c optional ath_hal | ath_rf2425 | ath_rf2417 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5111.c optional ath_hal | ath_rf5111 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5112.c optional ath_hal | ath_rf5112 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5212/ar5413.c optional ath_hal | ath_rf5413 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar5416/ar2133.c optional ath_hal | ath_ar5416 | \ ath_ar9130 | ath_ar9160 | ath_ar9280 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9280.c optional ath_hal | ath_ar9280 | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9285.c optional ath_hal | ath_ar9285 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" dev/ath/ath_hal/ar9002/ar9287.c optional ath_hal | ath_ar9287 \ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal" # ath rate control algorithms dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/onoe/onoe.c optional ath_rate_onoe \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/ath_rate/sample/sample.c optional ath_rate_sample \ compile-with "${NORMAL_C} -I$S/dev/ath" # ath DFS modules dev/ath/ath_dfs/null/dfs_null.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" # dev/bce/if_bce.c optional bce dev/bfe/if_bfe.c optional bfe dev/bge/if_bge.c optional bge dev/bhnd/bhnd.c optional bhnd dev/bhnd/bhnd_erom.c optional bhnd dev/bhnd/bhnd_erom_if.m optional bhnd dev/bhnd/bhnd_subr.c optional bhnd dev/bhnd/bhnd_bus_if.m optional bhnd dev/bhnd/bhndb/bhnd_bhndb.c optional bhndb bhnd dev/bhnd/bhndb/bhndb.c optional bhndb bhnd dev/bhnd/bhndb/bhndb_bus_if.m optional bhndb bhnd dev/bhnd/bhndb/bhndb_hwdata.c optional bhndb bhnd dev/bhnd/bhndb/bhndb_if.m optional bhndb bhnd dev/bhnd/bhndb/bhndb_pci.c optional bhndb_pci bhndb bhnd pci dev/bhnd/bhndb/bhndb_pci_hwdata.c optional bhndb_pci bhndb bhnd pci dev/bhnd/bhndb/bhndb_pci_sprom.c optional bhndb_pci bhndb bhnd pci dev/bhnd/bhndb/bhndb_subr.c optional bhndb bhnd dev/bhnd/bcma/bcma.c optional bcma bhnd dev/bhnd/bcma/bcma_bhndb.c optional bcma bhnd bhndb dev/bhnd/bcma/bcma_erom.c optional bcma bhnd dev/bhnd/bcma/bcma_subr.c optional bcma bhnd dev/bhnd/cores/chipc/bhnd_chipc_if.m optional bhnd dev/bhnd/cores/chipc/bhnd_sprom_chipc.c optional bhnd dev/bhnd/cores/chipc/bhnd_pmu_chipc.c optional bhnd dev/bhnd/cores/chipc/chipc.c optional bhnd dev/bhnd/cores/chipc/chipc_cfi.c optional bhnd cfi dev/bhnd/cores/chipc/chipc_gpio.c optional bhnd gpio dev/bhnd/cores/chipc/chipc_slicer.c optional bhnd cfi | bhnd spibus dev/bhnd/cores/chipc/chipc_spi.c optional bhnd spibus dev/bhnd/cores/chipc/chipc_subr.c optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl.c optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_if.m optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_hostb_if.m optional bhnd dev/bhnd/cores/chipc/pwrctl/bhnd_pwrctl_subr.c optional bhnd dev/bhnd/cores/pci/bhnd_pci.c optional bhnd pci dev/bhnd/cores/pci/bhnd_pci_hostb.c optional bhndb bhnd pci dev/bhnd/cores/pci/bhnd_pcib.c optional bhnd_pcib bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2.c optional bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2_hostb.c optional bhndb bhnd pci dev/bhnd/cores/pcie2/bhnd_pcie2b.c optional bhnd_pcie2b bhnd pci dev/bhnd/cores/pmu/bhnd_pmu.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_core.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_if.m optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_bcm.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_bcmraw.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_btxt.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_sprom.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_sprom_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_data_tlv.c optional bhnd dev/bhnd/nvram/bhnd_nvram_if.m optional bhnd dev/bhnd/nvram/bhnd_nvram_io.c optional bhnd dev/bhnd/nvram/bhnd_nvram_iobuf.c optional bhnd dev/bhnd/nvram/bhnd_nvram_ioptr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_iores.c optional bhnd dev/bhnd/nvram/bhnd_nvram_plist.c optional bhnd dev/bhnd/nvram/bhnd_nvram_store.c optional bhnd dev/bhnd/nvram/bhnd_nvram_store_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_subr.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value_fmts.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value_prf.c optional bhnd dev/bhnd/nvram/bhnd_nvram_value_subr.c optional bhnd dev/bhnd/nvram/bhnd_sprom.c optional bhnd dev/bhnd/siba/siba.c optional siba bhnd dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb dev/bhnd/siba/siba_erom.c optional siba bhnd dev/bhnd/siba/siba_subr.c optional siba bhnd # dev/bktr/bktr_audio.c optional bktr pci dev/bktr/bktr_card.c optional bktr pci dev/bktr/bktr_core.c optional bktr pci dev/bktr/bktr_i2c.c optional bktr pci smbus dev/bktr/bktr_os.c optional bktr pci dev/bktr/bktr_tuner.c optional bktr pci dev/bktr/msp34xx.c optional bktr pci dev/bnxt/bnxt_hwrm.c optional bnxt iflib pci dev/bnxt/bnxt_sysctl.c optional bnxt iflib pci dev/bnxt/bnxt_txrx.c optional bnxt iflib pci dev/bnxt/if_bnxt.c optional bnxt iflib pci dev/bwi/bwimac.c optional bwi dev/bwi/bwiphy.c optional bwi dev/bwi/bwirf.c optional bwi dev/bwi/if_bwi.c optional bwi dev/bwi/if_bwi_pci.c optional bwi pci dev/bwn/if_bwn.c optional bwn bhnd dev/bwn/if_bwn_pci.c optional bwn pci bhnd bhndb bhndb_pci dev/bwn/if_bwn_phy_common.c optional bwn bhnd dev/bwn/if_bwn_phy_g.c optional bwn bhnd dev/bwn/if_bwn_phy_lp.c optional bwn bhnd dev/bwn/if_bwn_phy_n.c optional bwn bhnd dev/bwn/if_bwn_util.c optional bwn bhnd dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus dev/cas/if_cas.c optional cas dev/cfi/cfi_bus_fdt.c optional cfi fdt dev/cfi/cfi_bus_nexus.c optional cfi dev/cfi/cfi_core.c optional cfi dev/cfi/cfi_dev.c optional cfi dev/cfi/cfi_disk.c optional cfid dev/chromebook_platform/chromebook_platform.c optional chromebook_platform dev/ciss/ciss.c optional ciss dev/cmx/cmx.c optional cmx dev/cmx/cmx_pccard.c optional cmx pccard dev/cpufreq/ichss.c optional cpufreq pci dev/cxgb/cxgb_main.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_sge.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mc5.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_vsc7323.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_vsc8211.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_ael1002.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_aq100x.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_mv88e1xxx.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_xgmac.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_t3_hw.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/common/cxgb_tn1010.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/sys/uipc_mvec.c optional cxgb pci \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_clip.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_filter.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_if.m optional cxgbe pci dev/cxgbe/t4_iov.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sched.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_sge.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_smt.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_l2t.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_tracer.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_vf.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4_hw.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/common/t4vf_hw.c optional cxgbev pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_common.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_flash_utils.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_lib.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/cudbg_wtp.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/fastlz.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/cudbg/fastlz_api.c optional cxgbe \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" t4fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t4fw_cfg.fw:t4fw_cfg t4fw_cfg_uwire.fw:t4fw_cfg_uwire t4fw.fw:t4fw -mt4fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t4fw_cfg.c" t4fw_cfg.fwo optional cxgbe \ dependency "t4fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw_cfg.fwo" t4fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg.fw" t4fw_cfg_uwire.fwo optional cxgbe \ dependency "t4fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw_cfg_uwire.fwo" t4fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t4fw_cfg_uwire.fw" t4fw.fwo optional cxgbe \ dependency "t4fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t4fw.fwo" t4fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t4fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t4fw.fw" t5fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t5fw_cfg.fw:t5fw_cfg t5fw_cfg_uwire.fw:t5fw_cfg_uwire t5fw.fw:t5fw -mt5fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t5fw_cfg.c" t5fw_cfg.fwo optional cxgbe \ dependency "t5fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw_cfg.fwo" t5fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw_cfg.fw" t5fw_cfg_uwire.fwo optional cxgbe \ dependency "t5fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw_cfg_uwire.fwo" t5fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t5fw_cfg_uwire.fw" t5fw.fwo optional cxgbe \ dependency "t5fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t5fw.fwo" t5fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t5fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t5fw.fw" t6fw_cfg.c optional cxgbe \ compile-with "${AWK} -f $S/tools/fw_stub.awk t6fw_cfg.fw:t6fw_cfg t6fw_cfg_uwire.fw:t6fw_cfg_uwire t6fw.fw:t6fw -mt6fw_cfg -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "t6fw_cfg.c" t6fw_cfg.fwo optional cxgbe \ dependency "t6fw_cfg.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t6fw_cfg.fwo" t6fw_cfg.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t6fw_cfg.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw_cfg.fw" t6fw_cfg_uwire.fwo optional cxgbe \ dependency "t6fw_cfg_uwire.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t6fw_cfg_uwire.fwo" t6fw_cfg_uwire.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t6fw_cfg_uwire.txt" \ compile-with "${CP} ${.ALLSRC} ${.TARGET}" \ no-obj no-implicit-rule \ clean "t6fw_cfg_uwire.fw" t6fw.fwo optional cxgbe \ dependency "t6fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "t6fw.fwo" t6fw.fw optional cxgbe \ dependency "$S/dev/cxgbe/firmware/t6fw-1.23.0.0.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "t6fw.fw" dev/cxgbe/crypto/t4_crypto.c optional ccr \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cy/cy.c optional cy dev/cy/cy_isa.c optional cy isa dev/cy/cy_pci.c optional cy pci dev/cyapa/cyapa.c optional cyapa iicbus dev/dc/if_dc.c optional dc pci dev/dc/dcphy.c optional dc pci dev/dc/pnphy.c optional dc pci dev/dcons/dcons.c optional dcons dev/dcons/dcons_crom.c optional dcons_crom dev/dcons/dcons_os.c optional dcons dev/dme/if_dme.c optional dme dev/drm2/drm_agpsupport.c optional drm2 dev/drm2/drm_auth.c optional drm2 dev/drm2/drm_bufs.c optional drm2 dev/drm2/drm_buffer.c optional drm2 dev/drm2/drm_context.c optional drm2 dev/drm2/drm_crtc.c optional drm2 dev/drm2/drm_crtc_helper.c optional drm2 dev/drm2/drm_dma.c optional drm2 dev/drm2/drm_dp_helper.c optional drm2 dev/drm2/drm_dp_iic_helper.c optional drm2 dev/drm2/drm_drv.c optional drm2 dev/drm2/drm_edid.c optional drm2 dev/drm2/drm_fb_helper.c optional drm2 dev/drm2/drm_fops.c optional drm2 dev/drm2/drm_gem.c optional drm2 dev/drm2/drm_gem_names.c optional drm2 dev/drm2/drm_global.c optional drm2 dev/drm2/drm_hashtab.c optional drm2 dev/drm2/drm_ioctl.c optional drm2 dev/drm2/drm_irq.c optional drm2 dev/drm2/drm_linux_list_sort.c optional drm2 dev/drm2/drm_lock.c optional drm2 dev/drm2/drm_memory.c optional drm2 dev/drm2/drm_mm.c optional drm2 dev/drm2/drm_modes.c optional drm2 dev/drm2/drm_pci.c optional drm2 dev/drm2/drm_platform.c optional drm2 dev/drm2/drm_scatter.c optional drm2 dev/drm2/drm_stub.c optional drm2 dev/drm2/drm_sysctl.c optional drm2 dev/drm2/drm_vm.c optional drm2 dev/drm2/drm_os_freebsd.c optional drm2 dev/drm2/ttm/ttm_agp_backend.c optional drm2 dev/drm2/ttm/ttm_lock.c optional drm2 dev/drm2/ttm/ttm_object.c optional drm2 dev/drm2/ttm/ttm_tt.c optional drm2 dev/drm2/ttm/ttm_bo_util.c optional drm2 dev/drm2/ttm/ttm_bo.c optional drm2 dev/drm2/ttm/ttm_bo_manager.c optional drm2 dev/drm2/ttm/ttm_execbuf_util.c optional drm2 dev/drm2/ttm/ttm_memory.c optional drm2 dev/drm2/ttm/ttm_page_alloc.c optional drm2 dev/drm2/ttm/ttm_bo_vm.c optional drm2 dev/efidev/efidev.c optional efirt dev/efidev/efirt.c optional efirt dev/efidev/efirtc.c optional efirt dev/e1000/if_em.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/em_txrx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/igb_txrx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_80003es2lan.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82540.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82541.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82542.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82543.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82571.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_82575.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_ich8lan.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_i210.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_api.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mac.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_manage.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_nvm.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_phy.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_vf.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_mbx.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/e1000/e1000_osdep.c optional em \ compile-with "${NORMAL_C} -I$S/dev/e1000" dev/et/if_et.c optional et dev/ena/ena.c optional ena \ compile-with "${NORMAL_C} -I$S/contrib" dev/ena/ena_sysctl.c optional ena \ compile-with "${NORMAL_C} -I$S/contrib" contrib/ena-com/ena_com.c optional ena contrib/ena-com/ena_eth_com.c optional ena dev/esp/esp_pci.c optional esp pci dev/esp/ncr53c9x.c optional esp dev/etherswitch/arswitch/arswitch.c optional arswitch dev/etherswitch/arswitch/arswitch_reg.c optional arswitch dev/etherswitch/arswitch/arswitch_phy.c optional arswitch dev/etherswitch/arswitch/arswitch_8216.c optional arswitch dev/etherswitch/arswitch/arswitch_8226.c optional arswitch dev/etherswitch/arswitch/arswitch_8316.c optional arswitch dev/etherswitch/arswitch/arswitch_8327.c optional arswitch dev/etherswitch/arswitch/arswitch_7240.c optional arswitch dev/etherswitch/arswitch/arswitch_9340.c optional arswitch dev/etherswitch/arswitch/arswitch_vlans.c optional arswitch dev/etherswitch/etherswitch.c optional etherswitch dev/etherswitch/etherswitch_if.m optional etherswitch dev/etherswitch/ip17x/ip17x.c optional ip17x dev/etherswitch/ip17x/ip175c.c optional ip17x dev/etherswitch/ip17x/ip175d.c optional ip17x dev/etherswitch/ip17x/ip17x_phy.c optional ip17x dev/etherswitch/ip17x/ip17x_vlans.c optional ip17x dev/etherswitch/miiproxy.c optional miiproxy dev/etherswitch/rtl8366/rtl8366rb.c optional rtl8366rb dev/etherswitch/e6000sw/e6000sw.c optional e6000sw dev/etherswitch/e6000sw/e6060sw.c optional e6060sw dev/etherswitch/infineon/adm6996fc.c optional adm6996fc dev/etherswitch/micrel/ksz8995ma.c optional ksz8995ma dev/etherswitch/ukswitch/ukswitch.c optional ukswitch dev/evdev/cdev.c optional evdev dev/evdev/evdev.c optional evdev dev/evdev/evdev_mt.c optional evdev dev/evdev/evdev_utils.c optional evdev dev/evdev/uinput.c optional evdev uinput dev/exca/exca.c optional cbb dev/extres/clk/clk.c optional ext_resources clk fdt dev/extres/clk/clkdev_if.m optional ext_resources clk fdt dev/extres/clk/clknode_if.m optional ext_resources clk fdt dev/extres/clk/clk_bus.c optional ext_resources clk fdt dev/extres/clk/clk_div.c optional ext_resources clk fdt dev/extres/clk/clk_fixed.c optional ext_resources clk fdt dev/extres/clk/clk_gate.c optional ext_resources clk fdt dev/extres/clk/clk_mux.c optional ext_resources clk fdt dev/extres/phy/phy.c optional ext_resources phy fdt dev/extres/phy/phydev_if.m optional ext_resources phy fdt dev/extres/phy/phynode_if.m optional ext_resources phy fdt dev/extres/phy/phy_usb.c optional ext_resources phy fdt dev/extres/phy/phynode_usb_if.m optional ext_resources phy fdt dev/extres/hwreset/hwreset.c optional ext_resources hwreset fdt dev/extres/hwreset/hwreset_if.m optional ext_resources hwreset fdt dev/extres/nvmem/nvmem.c optional ext_resources nvmem fdt dev/extres/nvmem/nvmem_if.m optional ext_resources nvmem fdt dev/extres/regulator/regdev_if.m optional ext_resources regulator fdt dev/extres/regulator/regnode_if.m optional ext_resources regulator fdt dev/extres/regulator/regulator.c optional ext_resources regulator fdt dev/extres/regulator/regulator_bus.c optional ext_resources regulator fdt dev/extres/regulator/regulator_fixed.c optional ext_resources regulator fdt dev/extres/syscon/syscon.c optional ext_resources syscon dev/extres/syscon/syscon_generic.c optional ext_resources syscon fdt dev/extres/syscon/syscon_if.m optional ext_resources syscon dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard dev/fb/splash.c optional sc splash dev/fdt/fdt_clock.c optional fdt fdt_clock dev/fdt/fdt_clock_if.m optional fdt fdt_clock dev/fdt/fdt_common.c optional fdt dev/fdt/fdt_pinctrl.c optional fdt fdt_pinctrl dev/fdt/fdt_pinctrl_if.m optional fdt fdt_pinctrl dev/fdt/fdt_slicer.c optional fdt cfi | fdt mx25l | fdt n25q | fdt at45d dev/fdt/fdt_static_dtb.S optional fdt fdt_dtb_static \ dependency "${FDT_DTS_FILE:T:R}.dtb" dev/fdt/simplebus.c optional fdt dev/fdt/simple_mfd.c optional syscon fdt dev/filemon/filemon.c optional filemon dev/firewire/firewire.c optional firewire dev/firewire/fwcrom.c optional firewire dev/firewire/fwdev.c optional firewire dev/firewire/fwdma.c optional firewire dev/firewire/fwmem.c optional firewire dev/firewire/fwohci.c optional firewire dev/firewire/fwohci_pci.c optional firewire pci dev/firewire/if_fwe.c optional fwe dev/firewire/if_fwip.c optional fwip dev/firewire/sbp.c optional sbp dev/firewire/sbp_targ.c optional sbp_targ dev/flash/at45d.c optional at45d dev/flash/cqspi.c optional cqspi fdt xdma dev/flash/mx25l.c optional mx25l dev/flash/n25q.c optional n25q fdt dev/flash/qspi_if.m optional cqspi fdt | n25q fdt dev/fxp/if_fxp.c optional fxp dev/fxp/inphy.c optional fxp dev/gem/if_gem.c optional gem dev/gem/if_gem_pci.c optional gem pci dev/gem/if_gem_sbus.c optional gem sbus dev/gpio/dwgpio/dwgpio.c optional gpio dwgpio fdt dev/gpio/dwgpio/dwgpio_bus.c optional gpio dwgpio fdt dev/gpio/dwgpio/dwgpio_if.m optional gpio dwgpio fdt dev/gpio/gpiobacklight.c optional gpiobacklight fdt dev/gpio/gpiokeys.c optional gpiokeys fdt dev/gpio/gpiokeys_codes.c optional gpiokeys fdt dev/gpio/gpiobus.c optional gpio \ dependency "gpiobus_if.h" dev/gpio/gpioc.c optional gpio \ dependency "gpio_if.h" dev/gpio/gpioiic.c optional gpioiic dev/gpio/gpioled.c optional gpioled !fdt dev/gpio/gpioled_fdt.c optional gpioled fdt dev/gpio/gpiopower.c optional gpiopower fdt dev/gpio/gpioregulator.c optional gpioregulator fdt ext_resources dev/gpio/gpiospi.c optional gpiospi dev/gpio/gpioths.c optional gpioths dev/gpio/gpio_if.m optional gpio dev/gpio/gpiobus_if.m optional gpio dev/gpio/gpiopps.c optional gpiopps fdt dev/gpio/ofw_gpiobus.c optional fdt gpio dev/hifn/hifn7751.c optional hifn dev/hme/if_hme.c optional hme dev/hme/if_hme_pci.c optional hme pci dev/hme/if_hme_sbus.c optional hme sbus dev/hptiop/hptiop.c optional hptiop scbus dev/hwpmc/hwpmc_logging.c optional hwpmc dev/hwpmc/hwpmc_mod.c optional hwpmc dev/hwpmc/hwpmc_soft.c optional hwpmc dev/ichiic/ig4_acpi.c optional ig4 acpi iicbus dev/ichiic/ig4_iic.c optional ig4 iicbus dev/ichiic/ig4_pci.c optional ig4 pci iicbus dev/ichsmb/ichsmb.c optional ichsmb dev/ichsmb/ichsmb_pci.c optional ichsmb pci dev/ida/ida.c optional ida dev/ida/ida_disk.c optional ida dev/ida/ida_pci.c optional ida pci dev/iicbus/ad7418.c optional ad7418 dev/iicbus/ads111x.c optional ads111x dev/iicbus/ds1307.c optional ds1307 dev/iicbus/ds13rtc.c optional ds13rtc | ds133x | ds1374 dev/iicbus/ds1672.c optional ds1672 dev/iicbus/ds3231.c optional ds3231 dev/iicbus/syr827.c optional syr827 ext_resources fdt dev/iicbus/icee.c optional icee dev/iicbus/if_ic.c optional ic dev/iicbus/iic.c optional iic dev/iicbus/iic_recover_bus.c optional iicbus dev/iicbus/iicbb.c optional iicbb dev/iicbus/iicbb_if.m optional iicbb dev/iicbus/iicbus.c optional iicbus dev/iicbus/iicbus_if.m optional iicbus dev/iicbus/iiconf.c optional iicbus dev/iicbus/iicsmb.c optional iicsmb \ dependency "iicbus_if.h" dev/iicbus/iicoc.c optional iicoc dev/iicbus/isl12xx.c optional isl12xx dev/iicbus/lm75.c optional lm75 dev/iicbus/nxprtc.c optional nxprtc | pcf8563 dev/iicbus/ofw_iicbus.c optional fdt iicbus dev/iicbus/rtc8583.c optional rtc8583 dev/iicbus/s35390a.c optional s35390a dev/iicbus/sy8106a.c optional sy8106a ext_resources fdt dev/iir/iir.c optional iir dev/iir/iir_ctrl.c optional iir dev/iir/iir_pci.c optional iir pci dev/intpm/intpm.c optional intpm pci # XXX Work around clang warning, until maintainer approves fix. dev/ips/ips.c optional ips \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/ips/ips_commands.c optional ips dev/ips/ips_disk.c optional ips dev/ips/ips_ioctl.c optional ips dev/ips/ips_pci.c optional ips pci dev/ipw/if_ipw.c optional ipw ipwbssfw.c optional ipwbssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_bss.fw:ipw_bss:130 -lintel_ipw -mipw_bss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwbssfw.c" ipw_bss.fwo optional ipwbssfw | ipwfw \ dependency "ipw_bss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_bss.fwo" ipw_bss.fw optional ipwbssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_bss.fw" ipwibssfw.c optional ipwibssfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_ibss.fw:ipw_ibss:130 -lintel_ipw -mipw_ibss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwibssfw.c" ipw_ibss.fwo optional ipwibssfw | ipwfw \ dependency "ipw_ibss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_ibss.fwo" ipw_ibss.fw optional ipwibssfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-i.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_ibss.fw" ipwmonitorfw.c optional ipwmonitorfw | ipwfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk ipw_monitor.fw:ipw_monitor:130 -lintel_ipw -mipw_monitor -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "ipwmonitorfw.c" ipw_monitor.fwo optional ipwmonitorfw | ipwfw \ dependency "ipw_monitor.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "ipw_monitor.fwo" ipw_monitor.fw optional ipwmonitorfw | ipwfw \ dependency "$S/contrib/dev/ipw/ipw2100-1.3-p.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "ipw_monitor.fw" dev/iscsi/icl.c optional iscsi dev/iscsi/icl_conn_if.m optional cfiscsi | iscsi dev/iscsi/icl_soft.c optional iscsi dev/iscsi/icl_soft_proxy.c optional iscsi dev/iscsi/iscsi.c optional iscsi scbus dev/iscsi_initiator/iscsi.c optional iscsi_initiator scbus dev/iscsi_initiator/iscsi_subr.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_cam.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_soc.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_sm.c optional iscsi_initiator scbus dev/iscsi_initiator/isc_subr.c optional iscsi_initiator scbus dev/ismt/ismt.c optional ismt dev/isl/isl.c optional isl iicbus dev/isp/isp.c optional isp dev/isp/isp_freebsd.c optional isp dev/isp/isp_library.c optional isp dev/isp/isp_pci.c optional isp pci dev/isp/isp_sbus.c optional isp sbus dev/isp/isp_target.c optional isp dev/ispfw/ispfw.c optional ispfw dev/iwi/if_iwi.c optional iwi iwibssfw.c optional iwibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_bss.fw:iwi_bss:300 -lintel_iwi -miwi_bss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwibssfw.c" iwi_bss.fwo optional iwibssfw | iwifw \ dependency "iwi_bss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_bss.fwo" iwi_bss.fw optional iwibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-bss.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_bss.fw" iwiibssfw.c optional iwiibssfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_ibss.fw:iwi_ibss:300 -lintel_iwi -miwi_ibss -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwiibssfw.c" iwi_ibss.fwo optional iwiibssfw | iwifw \ dependency "iwi_ibss.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_ibss.fwo" iwi_ibss.fw optional iwiibssfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-ibss.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_ibss.fw" iwimonitorfw.c optional iwimonitorfw | iwifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwi_monitor.fw:iwi_monitor:300 -lintel_iwi -miwi_monitor -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwimonitorfw.c" iwi_monitor.fwo optional iwimonitorfw | iwifw \ dependency "iwi_monitor.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwi_monitor.fwo" iwi_monitor.fw optional iwimonitorfw | iwifw \ dependency "$S/contrib/dev/iwi/ipw2200-sniffer.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwi_monitor.fw" dev/iwm/if_iwm.c optional iwm dev/iwm/if_iwm_7000.c optional iwm dev/iwm/if_iwm_8000.c optional iwm dev/iwm/if_iwm_binding.c optional iwm dev/iwm/if_iwm_fw.c optional iwm dev/iwm/if_iwm_led.c optional iwm dev/iwm/if_iwm_mac_ctxt.c optional iwm dev/iwm/if_iwm_notif_wait.c optional iwm dev/iwm/if_iwm_pcie_trans.c optional iwm dev/iwm/if_iwm_phy_ctxt.c optional iwm dev/iwm/if_iwm_phy_db.c optional iwm dev/iwm/if_iwm_power.c optional iwm dev/iwm/if_iwm_scan.c optional iwm dev/iwm/if_iwm_sf.c optional iwm dev/iwm/if_iwm_sta.c optional iwm dev/iwm/if_iwm_time_event.c optional iwm dev/iwm/if_iwm_util.c optional iwm iwm3160fw.c optional iwm3160fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3160.fw:iwm3160fw -miwm3160fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm3160fw.c" iwm3160fw.fwo optional iwm3160fw | iwmfw \ dependency "iwm3160.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm3160fw.fwo" iwm3160.fw optional iwm3160fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-3160-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3160.fw" iwm3168fw.c optional iwm3168fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm3168.fw:iwm3168fw -miwm3168fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm3168fw.c" iwm3168fw.fwo optional iwm3168fw | iwmfw \ dependency "iwm3168.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm3168fw.fwo" iwm3168.fw optional iwm3168fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-3168-22.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm3168.fw" iwm7260fw.c optional iwm7260fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7260.fw:iwm7260fw -miwm7260fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7260fw.c" iwm7260fw.fwo optional iwm7260fw | iwmfw \ dependency "iwm7260.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7260fw.fwo" iwm7260.fw optional iwm7260fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7260-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7260.fw" iwm7265fw.c optional iwm7265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265.fw:iwm7265fw -miwm7265fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7265fw.c" iwm7265fw.fwo optional iwm7265fw | iwmfw \ dependency "iwm7265.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7265fw.fwo" iwm7265.fw optional iwm7265fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7265-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265.fw" iwm7265Dfw.c optional iwm7265Dfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm7265D.fw:iwm7265Dfw -miwm7265Dfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm7265Dfw.c" iwm7265Dfw.fwo optional iwm7265Dfw | iwmfw \ dependency "iwm7265D.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm7265Dfw.fwo" iwm7265D.fw optional iwm7265Dfw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-7265D-17.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm7265D.fw" iwm8000Cfw.c optional iwm8000Cfw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8000C.fw:iwm8000Cfw -miwm8000Cfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm8000Cfw.c" iwm8000Cfw.fwo optional iwm8000Cfw | iwmfw \ dependency "iwm8000C.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm8000Cfw.fwo" iwm8000C.fw optional iwm8000Cfw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-8000C-16.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8000C.fw" iwm8265.fw optional iwm8265fw | iwmfw \ dependency "$S/contrib/dev/iwm/iwm-8265-22.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwm8265.fw" iwm8265fw.c optional iwm8265fw | iwmfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwm8265.fw:iwm8265fw -miwm8265fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwm8265fw.c" iwm8265fw.fwo optional iwm8265fw | iwmfw \ dependency "iwm8265.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwm8265fw.fwo" dev/iwn/if_iwn.c optional iwn iwn1000fw.c optional iwn1000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn1000.fw:iwn1000fw -miwn1000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn1000fw.c" iwn1000fw.fwo optional iwn1000fw | iwnfw \ dependency "iwn1000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn1000fw.fwo" iwn1000.fw optional iwn1000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-1000-39.31.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn1000.fw" iwn100fw.c optional iwn100fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn100.fw:iwn100fw -miwn100fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn100fw.c" iwn100fw.fwo optional iwn100fw | iwnfw \ dependency "iwn100.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn100fw.fwo" iwn100.fw optional iwn100fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-100-39.31.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn100.fw" iwn105fw.c optional iwn105fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn105.fw:iwn105fw -miwn105fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn105fw.c" iwn105fw.fwo optional iwn105fw | iwnfw \ dependency "iwn105.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn105fw.fwo" iwn105.fw optional iwn105fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-105-6-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn105.fw" iwn135fw.c optional iwn135fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn135.fw:iwn135fw -miwn135fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn135fw.c" iwn135fw.fwo optional iwn135fw | iwnfw \ dependency "iwn135.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn135fw.fwo" iwn135.fw optional iwn135fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-135-6-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn135.fw" iwn2000fw.c optional iwn2000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2000.fw:iwn2000fw -miwn2000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn2000fw.c" iwn2000fw.fwo optional iwn2000fw | iwnfw \ dependency "iwn2000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn2000fw.fwo" iwn2000.fw optional iwn2000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-2000-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn2000.fw" iwn2030fw.c optional iwn2030fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn2030.fw:iwn2030fw -miwn2030fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn2030fw.c" iwn2030fw.fwo optional iwn2030fw | iwnfw \ dependency "iwn2030.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn2030fw.fwo" iwn2030.fw optional iwn2030fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwnwifi-2030-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn2030.fw" iwn4965fw.c optional iwn4965fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn4965.fw:iwn4965fw -miwn4965fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn4965fw.c" iwn4965fw.fwo optional iwn4965fw | iwnfw \ dependency "iwn4965.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn4965fw.fwo" iwn4965.fw optional iwn4965fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-4965-228.61.2.24.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn4965.fw" iwn5000fw.c optional iwn5000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5000.fw:iwn5000fw -miwn5000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn5000fw.c" iwn5000fw.fwo optional iwn5000fw | iwnfw \ dependency "iwn5000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5000fw.fwo" iwn5000.fw optional iwn5000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5000-8.83.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5000.fw" iwn5150fw.c optional iwn5150fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn5150.fw:iwn5150fw -miwn5150fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn5150fw.c" iwn5150fw.fwo optional iwn5150fw | iwnfw \ dependency "iwn5150.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn5150fw.fwo" iwn5150.fw optional iwn5150fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-5150-8.24.2.2.fw.uu"\ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn5150.fw" iwn6000fw.c optional iwn6000fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000.fw:iwn6000fw -miwn6000fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000fw.c" iwn6000fw.fwo optional iwn6000fw | iwnfw \ dependency "iwn6000.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000fw.fwo" iwn6000.fw optional iwn6000fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000-9.221.4.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000.fw" iwn6000g2afw.c optional iwn6000g2afw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2a.fw:iwn6000g2afw -miwn6000g2afw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000g2afw.c" iwn6000g2afw.fwo optional iwn6000g2afw | iwnfw \ dependency "iwn6000g2a.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2afw.fwo" iwn6000g2a.fw optional iwn6000g2afw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2a-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2a.fw" iwn6000g2bfw.c optional iwn6000g2bfw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6000g2b.fw:iwn6000g2bfw -miwn6000g2bfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6000g2bfw.c" iwn6000g2bfw.fwo optional iwn6000g2bfw | iwnfw \ dependency "iwn6000g2b.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6000g2bfw.fwo" iwn6000g2b.fw optional iwn6000g2bfw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6000g2b-18.168.6.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6000g2b.fw" iwn6050fw.c optional iwn6050fw | iwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk iwn6050.fw:iwn6050fw -miwn6050fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "iwn6050fw.c" iwn6050fw.fwo optional iwn6050fw | iwnfw \ dependency "iwn6050.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "iwn6050fw.fwo" iwn6050.fw optional iwn6050fw | iwnfw \ dependency "$S/contrib/dev/iwn/iwlwifi-6050-41.28.5.1.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "iwn6050.fw" dev/ixgbe/if_ix.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_ixv.c optional ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe -DSMP" dev/ixgbe/if_bypass.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/if_fdir.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/if_sriov.c optional ix inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ix_txrx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_osdep.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_phy.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_api.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_common.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_mbx.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_vf.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82598.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_82599.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x540.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_x550.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82598.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/ixgbe/ixgbe_dcb_82599.c optional ix inet | ixv inet \ compile-with "${NORMAL_C} -I$S/dev/ixgbe" dev/jedec_dimm/jedec_dimm.c optional jedec_dimm smbus dev/jme/if_jme.c optional jme pci dev/kbd/kbd.c optional atkbd | pckbd | sc | ukbd | vt dev/kbdmux/kbdmux.c optional kbdmux dev/ksyms/ksyms.c optional ksyms dev/le/am7990.c optional le dev/le/am79900.c optional le dev/le/if_le_pci.c optional le pci dev/le/lance.c optional le dev/led/led.c standard dev/lge/if_lge.c optional lge dev/liquidio/base/cn23xx_pf_device.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_console.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_ctrl.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_device.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_droq.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_mem_ops.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_request_manager.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/base/lio_response_manager.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_core.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_ioctl.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_main.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_rss.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_rxtx.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" dev/liquidio/lio_sysctl.c optional lio \ compile-with "${NORMAL_C} \ -I$S/dev/liquidio -I$S/dev/liquidio/base -DSMP" lio.c optional lio \ compile-with "${AWK} -f $S/tools/fw_stub.awk lio_23xx_nic.bin.fw:lio_23xx_nic.bin -mlio_23xx_nic.bin -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "lio.c" lio_23xx_nic.bin.fw.fwo optional lio \ dependency "lio_23xx_nic.bin.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "lio_23xx_nic.bin.fw.fwo" lio_23xx_nic.bin.fw optional lio \ dependency "$S/contrib/dev/liquidio/lio_23xx_nic.bin.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "lio_23xx_nic.bin.fw" dev/malo/if_malo.c optional malo dev/malo/if_malohal.c optional malo dev/malo/if_malo_pci.c optional malo pci dev/mc146818/mc146818.c optional mc146818 dev/md/md.c optional md dev/mdio/mdio_if.m optional miiproxy | mdio dev/mdio/mdio.c optional miiproxy | mdio dev/mem/memdev.c optional mem dev/mem/memutil.c optional mem dev/mfi/mfi.c optional mfi dev/mfi/mfi_debug.c optional mfi dev/mfi/mfi_pci.c optional mfi pci dev/mfi/mfi_disk.c optional mfi dev/mfi/mfi_syspd.c optional mfi dev/mfi/mfi_tbolt.c optional mfi dev/mfi/mfi_linux.c optional mfi compat_linux dev/mfi/mfi_cam.c optional mfip scbus dev/mii/acphy.c optional miibus | acphy dev/mii/amphy.c optional miibus | amphy dev/mii/atphy.c optional miibus | atphy dev/mii/axphy.c optional miibus | axphy dev/mii/bmtphy.c optional miibus | bmtphy dev/mii/brgphy.c optional miibus | brgphy dev/mii/ciphy.c optional miibus | ciphy dev/mii/e1000phy.c optional miibus | e1000phy dev/mii/gentbi.c optional miibus | gentbi dev/mii/icsphy.c optional miibus | icsphy dev/mii/ip1000phy.c optional miibus | ip1000phy dev/mii/jmphy.c optional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy dev/mii/micphy.c optional miibus fdt | micphy fdt dev/mii/mii.c optional miibus | mii dev/mii/mii_bitbang.c optional miibus | mii_bitbang dev/mii/mii_physubr.c optional miibus | mii dev/mii/mii_fdt.c optional miibus fdt | mii fdt dev/mii/miibus_if.m optional miibus | mii dev/mii/mlphy.c optional miibus | mlphy dev/mii/nsgphy.c optional miibus | nsgphy dev/mii/nsphy.c optional miibus | nsphy dev/mii/nsphyter.c optional miibus | nsphyter dev/mii/pnaphy.c optional miibus | pnaphy dev/mii/qsphy.c optional miibus | qsphy dev/mii/rdcphy.c optional miibus | rdcphy dev/mii/rgephy.c optional miibus | rgephy dev/mii/rlphy.c optional miibus | rlphy dev/mii/rlswitch.c optional rlswitch dev/mii/smcphy.c optional miibus | smcphy dev/mii/smscphy.c optional miibus | smscphy dev/mii/tdkphy.c optional miibus | tdkphy dev/mii/tlphy.c optional miibus | tlphy dev/mii/truephy.c optional miibus | truephy dev/mii/ukphy.c optional miibus | mii dev/mii/ukphy_subr.c optional miibus | mii dev/mii/vscphy.c optional miibus | vscphy dev/mii/xmphy.c optional miibus | xmphy dev/mk48txx/mk48txx.c optional mk48txx dev/mlxfw/mlxfw_fsm.c optional mlxfw \ compile-with "${MLXFW_C}" dev/mlxfw/mlxfw_mfa2.c optional mlxfw \ compile-with "${MLXFW_C}" dev/mlxfw/mlxfw_mfa2_tlv_multi.c optional mlxfw \ compile-with "${MLXFW_C}" dev/mlx/mlx.c optional mlx dev/mlx/mlx_disk.c optional mlx dev/mlx/mlx_pci.c optional mlx pci dev/mly/mly.c optional mly dev/mmc/mmc_subr.c optional mmc | mmcsd !mmccam dev/mmc/mmc.c optional mmc !mmccam dev/mmc/mmcbr_if.m standard dev/mmc/mmcbus_if.m standard dev/mmc/mmcsd.c optional mmcsd !mmccam dev/mmcnull/mmcnull.c optional mmcnull dev/mn/if_mn.c optional mn pci dev/mpr/mpr.c optional mpr dev/mpr/mpr_config.c optional mpr # XXX Work around clang warning, until maintainer approves fix. dev/mpr/mpr_mapping.c optional mpr \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/mpr/mpr_pci.c optional mpr pci dev/mpr/mpr_sas.c optional mpr \ compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mpr/mpr_sas_lsi.c optional mpr dev/mpr/mpr_table.c optional mpr dev/mpr/mpr_user.c optional mpr dev/mps/mps.c optional mps dev/mps/mps_config.c optional mps # XXX Work around clang warning, until maintainer approves fix. dev/mps/mps_mapping.c optional mps \ compile-with "${NORMAL_C} ${NO_WSOMETIMES_UNINITIALIZED}" dev/mps/mps_pci.c optional mps pci dev/mps/mps_sas.c optional mps \ compile-with "${NORMAL_C} ${NO_WUNNEEDED_INTERNAL_DECL}" dev/mps/mps_sas_lsi.c optional mps dev/mps/mps_table.c optional mps dev/mps/mps_user.c optional mps dev/mpt/mpt.c optional mpt dev/mpt/mpt_cam.c optional mpt dev/mpt/mpt_debug.c optional mpt dev/mpt/mpt_pci.c optional mpt pci dev/mpt/mpt_raid.c optional mpt dev/mpt/mpt_user.c optional mpt dev/mrsas/mrsas.c optional mrsas dev/mrsas/mrsas_cam.c optional mrsas dev/mrsas/mrsas_ioctl.c optional mrsas dev/mrsas/mrsas_fp.c optional mrsas dev/msk/if_msk.c optional msk dev/mvs/mvs.c optional mvs dev/mvs/mvs_if.m optional mvs dev/mvs/mvs_pci.c optional mvs pci dev/mwl/if_mwl.c optional mwl dev/mwl/if_mwl_pci.c optional mwl pci dev/mwl/mwlhal.c optional mwl mwlfw.c optional mwlfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk mw88W8363.fw:mw88W8363fw mwlboot.fw:mwlboot -mmwl -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "mwlfw.c" mw88W8363.fwo optional mwlfw \ dependency "mw88W8363.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mw88W8363.fwo" mw88W8363.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mw88W8363.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mw88W8363.fw" mwlboot.fwo optional mwlfw \ dependency "mwlboot.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "mwlboot.fwo" mwlboot.fw optional mwlfw \ dependency "$S/contrib/dev/mwl/mwlboot.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "mwlboot.fw" dev/mxge/if_mxge.c optional mxge pci dev/mxge/mxge_eth_z8e.c optional mxge pci dev/mxge/mxge_ethp_z8e.c optional mxge pci dev/mxge/mxge_rss_eth_z8e.c optional mxge pci dev/mxge/mxge_rss_ethp_z8e.c optional mxge pci dev/my/if_my.c optional my dev/netmap/if_ptnet.c optional netmap inet dev/netmap/netmap.c optional netmap dev/netmap/netmap_bdg.c optional netmap dev/netmap/netmap_freebsd.c optional netmap dev/netmap/netmap_generic.c optional netmap dev/netmap/netmap_kloop.c optional netmap dev/netmap/netmap_legacy.c optional netmap dev/netmap/netmap_mbq.c optional netmap dev/netmap/netmap_mem2.c optional netmap dev/netmap/netmap_monitor.c optional netmap dev/netmap/netmap_null.c optional netmap dev/netmap/netmap_offloadings.c optional netmap dev/netmap/netmap_pipe.c optional netmap dev/netmap/netmap_vale.c optional netmap # compile-with "${NORMAL_C} -Wconversion -Wextra" dev/nfsmb/nfsmb.c optional nfsmb pci dev/nge/if_nge.c optional nge dev/nmdm/nmdm.c optional nmdm dev/null/null.c standard dev/nvd/nvd.c optional nvd nvme dev/nvme/nvme.c optional nvme dev/nvme/nvme_ahci.c optional nvme ahci dev/nvme/nvme_ctrlr.c optional nvme dev/nvme/nvme_ctrlr_cmd.c optional nvme dev/nvme/nvme_ns.c optional nvme dev/nvme/nvme_ns_cmd.c optional nvme dev/nvme/nvme_pci.c optional nvme pci dev/nvme/nvme_qpair.c optional nvme dev/nvme/nvme_sim.c optional nvme scbus dev/nvme/nvme_sysctl.c optional nvme dev/nvme/nvme_test.c optional nvme dev/nvme/nvme_util.c optional nvme dev/oce/oce_hw.c optional oce pci dev/oce/oce_if.c optional oce pci dev/oce/oce_mbox.c optional oce pci dev/oce/oce_queue.c optional oce pci dev/oce/oce_sysctl.c optional oce pci dev/oce/oce_util.c optional oce pci dev/ocs_fc/ocs_pci.c optional ocs_fc pci dev/ocs_fc/ocs_ioctl.c optional ocs_fc pci dev/ocs_fc/ocs_os.c optional ocs_fc pci dev/ocs_fc/ocs_utils.c optional ocs_fc pci dev/ocs_fc/ocs_hw.c optional ocs_fc pci dev/ocs_fc/ocs_hw_queues.c optional ocs_fc pci dev/ocs_fc/sli4.c optional ocs_fc pci dev/ocs_fc/ocs_sm.c optional ocs_fc pci dev/ocs_fc/ocs_device.c optional ocs_fc pci dev/ocs_fc/ocs_xport.c optional ocs_fc pci dev/ocs_fc/ocs_domain.c optional ocs_fc pci dev/ocs_fc/ocs_sport.c optional ocs_fc pci dev/ocs_fc/ocs_els.c optional ocs_fc pci dev/ocs_fc/ocs_fabric.c optional ocs_fc pci dev/ocs_fc/ocs_io.c optional ocs_fc pci dev/ocs_fc/ocs_node.c optional ocs_fc pci dev/ocs_fc/ocs_scsi.c optional ocs_fc pci dev/ocs_fc/ocs_unsol.c optional ocs_fc pci dev/ocs_fc/ocs_ddump.c optional ocs_fc pci dev/ocs_fc/ocs_mgmt.c optional ocs_fc pci dev/ocs_fc/ocs_cam.c optional ocs_fc pci dev/ofw/ofw_bus_if.m optional fdt dev/ofw/ofw_bus_subr.c optional fdt dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofw_fdt.c optional fdt dev/ofw/ofw_if.m optional fdt dev/ofw/ofw_graph.c optional fdt dev/ofw/ofw_subr.c optional fdt dev/ofw/ofwbus.c optional fdt dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt dev/ow/ow.c optional ow \ dependency "owll_if.h" \ dependency "own_if.h" dev/ow/owll_if.m optional ow dev/ow/own_if.m optional ow dev/ow/ow_temp.c optional ow_temp dev/ow/owc_gpiobus.c optional owc gpio dev/pbio/pbio.c optional pbio isa dev/pccard/card_if.m standard dev/pccard/pccard.c optional pccard dev/pccard/pccard_cis.c optional pccard dev/pccard/pccard_cis_quirks.c optional pccard dev/pccard/pccard_device.c optional pccard dev/pccard/power_if.m standard dev/pccbb/pccbb.c optional cbb dev/pccbb/pccbb_isa.c optional cbb isa dev/pccbb/pccbb_pci.c optional cbb pci dev/pcf/pcf.c optional pcf dev/pci/fixup_pci.c optional pci dev/pci/hostb_pci.c optional pci dev/pci/ignore_pci.c optional pci dev/pci/isa_pci.c optional pci isa dev/pci/pci.c optional pci dev/pci/pci_if.m standard dev/pci/pci_iov.c optional pci pci_iov dev/pci/pci_iov_if.m standard dev/pci/pci_iov_schema.c optional pci pci_iov dev/pci/pci_pci.c optional pci dev/pci/pci_subr.c optional pci dev/pci/pci_user.c optional pci dev/pci/pcib_if.m standard dev/pci/pcib_support.c standard dev/pci/vga_pci.c optional pci dev/pms/freebsd/driver/ini/src/agtiapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sadisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/mpi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saframe.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sahw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sainit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saint.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sampicmd.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sampirsp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saphy.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sasata.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sasmp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sassp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/satimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/sautil.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/saioctlcmd.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sallsdk/spc/mpidebug.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dminit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmsmp.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmdisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmtimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/discovery/dm/dmmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/sminit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsatcb.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smsathw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/sat/src/smtimer.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdinit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdmisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdesgl.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdport.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdint.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdioctl.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdhw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/ossacmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tddmcmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdsmcmnapi.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/common/tdtimers.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdio.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdcb.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itdinit.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sas/ini/itddisc.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/sat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/ossasat.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/pms/RefTisa/tisa/sassata/sata/host/sathw.c optional pmspcv \ compile-with "${NORMAL_C} -Wunused-variable -Woverflow -Wparentheses -w" dev/ppbus/if_plip.c optional plip dev/ppbus/immio.c optional vpo dev/ppbus/lpbb.c optional lpbb dev/ppbus/lpt.c optional lpt dev/ppbus/pcfclock.c optional pcfclock dev/ppbus/ppb_1284.c optional ppbus dev/ppbus/ppb_base.c optional ppbus dev/ppbus/ppb_msq.c optional ppbus dev/ppbus/ppbconf.c optional ppbus dev/ppbus/ppbus_if.m optional ppbus dev/ppbus/ppi.c optional ppi dev/ppbus/pps.c optional pps dev/ppbus/vpo.c optional vpo dev/ppbus/vpoio.c optional vpo dev/ppc/ppc.c optional ppc dev/ppc/ppc_acpi.c optional ppc acpi dev/ppc/ppc_isa.c optional ppc isa dev/ppc/ppc_pci.c optional ppc pci dev/ppc/ppc_puc.c optional ppc puc dev/proto/proto_bus_isa.c optional proto acpi | proto isa dev/proto/proto_bus_pci.c optional proto pci dev/proto/proto_busdma.c optional proto dev/proto/proto_core.c optional proto dev/pst/pst-iop.c optional pst dev/pst/pst-pci.c optional pst pci dev/pst/pst-raid.c optional pst dev/pty/pty.c optional pty dev/puc/puc.c optional puc dev/puc/puc_cfg.c optional puc dev/puc/puc_pccard.c optional puc pccard dev/puc/puc_pci.c optional puc pci dev/pwm/pwmc.c optional pwm | pwmc dev/pwm/pwmbus.c optional pwm | pwmbus dev/pwm/pwmbus_if.m optional pwm | pwmbus dev/pwm/ofw_pwm.c optional pwm fdt | pwmbus fdt dev/pwm/ofw_pwmbus.c optional pwm fdt | pwmbus fdt dev/quicc/quicc_core.c optional quicc dev/ral/rt2560.c optional ral dev/ral/rt2661.c optional ral dev/ral/rt2860.c optional ral dev/ral/if_ral_pci.c optional ral pci rt2561fw.c optional rt2561fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561.fw:rt2561fw -mrt2561 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2561fw.c" rt2561fw.fwo optional rt2561fw | ralfw \ dependency "rt2561.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561fw.fwo" rt2561.fw optional rt2561fw | ralfw \ dependency "$S/contrib/dev/ral/rt2561.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561.fw" rt2561sfw.c optional rt2561sfw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2561s.fw:rt2561sfw -mrt2561s -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2561sfw.c" rt2561sfw.fwo optional rt2561sfw | ralfw \ dependency "rt2561s.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2561sfw.fwo" rt2561s.fw optional rt2561sfw | ralfw \ dependency "$S/contrib/dev/ral/rt2561s.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2561s.fw" rt2661fw.c optional rt2661fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2661.fw:rt2661fw -mrt2661 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2661fw.c" rt2661fw.fwo optional rt2661fw | ralfw \ dependency "rt2661.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2661fw.fwo" rt2661.fw optional rt2661fw | ralfw \ dependency "$S/contrib/dev/ral/rt2661.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2661.fw" rt2860fw.c optional rt2860fw | ralfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rt2860.fw:rt2860fw -mrt2860 -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rt2860fw.c" rt2860fw.fwo optional rt2860fw | ralfw \ dependency "rt2860.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rt2860fw.fwo" rt2860.fw optional rt2860fw | ralfw \ dependency "$S/contrib/dev/ral/rt2860.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rt2860.fw" dev/random/random_infra.c standard dev/random/random_harvestq.c standard dev/random/randomdev.c optional !random_loadable dev/random/fortuna.c optional !random_loadable dev/random/hash.c optional !random_loadable dev/rc/rc.c optional rc dev/rccgpio/rccgpio.c optional rccgpio gpio dev/re/if_re.c optional re dev/rl/if_rl.c optional rl pci dev/rndtest/rndtest.c optional rndtest dev/rp/rp.c optional rp dev/rp/rp_isa.c optional rp isa dev/rp/rp_pci.c optional rp pci # dev/rtwn/if_rtwn.c optional rtwn dev/rtwn/if_rtwn_beacon.c optional rtwn dev/rtwn/if_rtwn_calib.c optional rtwn dev/rtwn/if_rtwn_cam.c optional rtwn dev/rtwn/if_rtwn_efuse.c optional rtwn dev/rtwn/if_rtwn_fw.c optional rtwn dev/rtwn/if_rtwn_rx.c optional rtwn dev/rtwn/if_rtwn_task.c optional rtwn dev/rtwn/if_rtwn_tx.c optional rtwn # dev/rtwn/pci/rtwn_pci_attach.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_reg.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_rx.c optional rtwn_pci pci dev/rtwn/pci/rtwn_pci_tx.c optional rtwn_pci pci # dev/rtwn/usb/rtwn_usb_attach.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_ep.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_reg.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_rx.c optional rtwn_usb dev/rtwn/usb/rtwn_usb_tx.c optional rtwn_usb # RTL8188E dev/rtwn/rtl8188e/r88e_beacon.c optional rtwn dev/rtwn/rtl8188e/r88e_calib.c optional rtwn dev/rtwn/rtl8188e/r88e_chan.c optional rtwn dev/rtwn/rtl8188e/r88e_fw.c optional rtwn dev/rtwn/rtl8188e/r88e_init.c optional rtwn dev/rtwn/rtl8188e/r88e_led.c optional rtwn dev/rtwn/rtl8188e/r88e_tx.c optional rtwn dev/rtwn/rtl8188e/r88e_rf.c optional rtwn dev/rtwn/rtl8188e/r88e_rom.c optional rtwn dev/rtwn/rtl8188e/r88e_rx.c optional rtwn dev/rtwn/rtl8188e/pci/r88ee_attach.c optional rtwn_pci pci dev/rtwn/rtl8188e/pci/r88ee_init.c optional rtwn_pci pci dev/rtwn/rtl8188e/pci/r88ee_rx.c optional rtwn_pci pci dev/rtwn/rtl8188e/usb/r88eu_attach.c optional rtwn_usb dev/rtwn/rtl8188e/usb/r88eu_init.c optional rtwn_usb # RTL8192C dev/rtwn/rtl8192c/r92c_attach.c optional rtwn dev/rtwn/rtl8192c/r92c_beacon.c optional rtwn dev/rtwn/rtl8192c/r92c_calib.c optional rtwn dev/rtwn/rtl8192c/r92c_chan.c optional rtwn dev/rtwn/rtl8192c/r92c_fw.c optional rtwn dev/rtwn/rtl8192c/r92c_init.c optional rtwn dev/rtwn/rtl8192c/r92c_llt.c optional rtwn dev/rtwn/rtl8192c/r92c_rf.c optional rtwn dev/rtwn/rtl8192c/r92c_rom.c optional rtwn dev/rtwn/rtl8192c/r92c_rx.c optional rtwn dev/rtwn/rtl8192c/r92c_tx.c optional rtwn dev/rtwn/rtl8192c/pci/r92ce_attach.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_calib.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_fw.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_init.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_led.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_rx.c optional rtwn_pci pci dev/rtwn/rtl8192c/pci/r92ce_tx.c optional rtwn_pci pci dev/rtwn/rtl8192c/usb/r92cu_attach.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_init.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_led.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_rx.c optional rtwn_usb dev/rtwn/rtl8192c/usb/r92cu_tx.c optional rtwn_usb # RTL8192E dev/rtwn/rtl8192e/r92e_chan.c optional rtwn dev/rtwn/rtl8192e/r92e_fw.c optional rtwn dev/rtwn/rtl8192e/r92e_init.c optional rtwn dev/rtwn/rtl8192e/r92e_led.c optional rtwn dev/rtwn/rtl8192e/r92e_rf.c optional rtwn dev/rtwn/rtl8192e/r92e_rom.c optional rtwn dev/rtwn/rtl8192e/r92e_rx.c optional rtwn dev/rtwn/rtl8192e/usb/r92eu_attach.c optional rtwn_usb dev/rtwn/rtl8192e/usb/r92eu_init.c optional rtwn_usb # RTL8812A dev/rtwn/rtl8812a/r12a_beacon.c optional rtwn dev/rtwn/rtl8812a/r12a_calib.c optional rtwn dev/rtwn/rtl8812a/r12a_caps.c optional rtwn dev/rtwn/rtl8812a/r12a_chan.c optional rtwn dev/rtwn/rtl8812a/r12a_fw.c optional rtwn dev/rtwn/rtl8812a/r12a_init.c optional rtwn dev/rtwn/rtl8812a/r12a_led.c optional rtwn dev/rtwn/rtl8812a/r12a_rf.c optional rtwn dev/rtwn/rtl8812a/r12a_rom.c optional rtwn dev/rtwn/rtl8812a/r12a_rx.c optional rtwn dev/rtwn/rtl8812a/r12a_tx.c optional rtwn dev/rtwn/rtl8812a/usb/r12au_attach.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_init.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_rx.c optional rtwn_usb dev/rtwn/rtl8812a/usb/r12au_tx.c optional rtwn_usb # RTL8821A dev/rtwn/rtl8821a/r21a_beacon.c optional rtwn dev/rtwn/rtl8821a/r21a_calib.c optional rtwn dev/rtwn/rtl8821a/r21a_chan.c optional rtwn dev/rtwn/rtl8821a/r21a_fw.c optional rtwn dev/rtwn/rtl8821a/r21a_init.c optional rtwn dev/rtwn/rtl8821a/r21a_led.c optional rtwn dev/rtwn/rtl8821a/r21a_rom.c optional rtwn dev/rtwn/rtl8821a/r21a_rx.c optional rtwn dev/rtwn/rtl8821a/usb/r21au_attach.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_dfs.c optional rtwn_usb dev/rtwn/rtl8821a/usb/r21au_init.c optional rtwn_usb rtwn-rtl8188eefw.c optional rtwn-rtl8188eefw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eefw.fw:rtwn-rtl8188eefw:111 -mrtwn-rtl8188eefw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8188eefw.c" rtwn-rtl8188eefw.fwo optional rtwn-rtl8188eefw | rtwnfw \ dependency "rtwn-rtl8188eefw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8188eefw.fwo" rtwn-rtl8188eefw.fw optional rtwn-rtl8188eefw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8188eefw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8188eefw.fw" rtwn-rtl8188eufw.c optional rtwn-rtl8188eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8188eufw.fw:rtwn-rtl8188eufw:111 -mrtwn-rtl8188eufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8188eufw.c" rtwn-rtl8188eufw.fwo optional rtwn-rtl8188eufw | rtwnfw \ dependency "rtwn-rtl8188eufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8188eufw.fwo" rtwn-rtl8188eufw.fw optional rtwn-rtl8188eufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8188eufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8188eufw.fw" rtwn-rtl8192cfwE.c optional rtwn-rtl8192cfwE | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE.fw:rtwn-rtl8192cfwE:111 -mrtwn-rtl8192cfwE -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE.c" rtwn-rtl8192cfwE.fwo optional rtwn-rtl8192cfwE | rtwnfw \ dependency "rtwn-rtl8192cfwE.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwE.fwo" rtwn-rtl8192cfwE.fw optional rtwn-rtl8192cfwE | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwE.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwE.fw" rtwn-rtl8192cfwE_B.c optional rtwn-rtl8192cfwE_B | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwE_B.fw:rtwn-rtl8192cfwE_B:111 -mrtwn-rtl8192cfwE_B -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwE_B.c" rtwn-rtl8192cfwE_B.fwo optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "rtwn-rtl8192cfwE_B.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwE_B.fwo" rtwn-rtl8192cfwE_B.fw optional rtwn-rtl8192cfwE_B | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwE_B.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwE_B.fw" rtwn-rtl8192cfwT.c optional rtwn-rtl8192cfwT | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwT.fw:rtwn-rtl8192cfwT:111 -mrtwn-rtl8192cfwT -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwT.c" rtwn-rtl8192cfwT.fwo optional rtwn-rtl8192cfwT | rtwnfw \ dependency "rtwn-rtl8192cfwT.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwT.fwo" rtwn-rtl8192cfwT.fw optional rtwn-rtl8192cfwT | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwT.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwT.fw" rtwn-rtl8192cfwU.c optional rtwn-rtl8192cfwU | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192cfwU.fw:rtwn-rtl8192cfwU:111 -mrtwn-rtl8192cfwU -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192cfwU.c" rtwn-rtl8192cfwU.fwo optional rtwn-rtl8192cfwU | rtwnfw \ dependency "rtwn-rtl8192cfwU.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192cfwU.fwo" rtwn-rtl8192cfwU.fw optional rtwn-rtl8192cfwU | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192cfwU.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192cfwU.fw" rtwn-rtl8192eufw.c optional rtwn-rtl8192eufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8192eufw.fw:rtwn-rtl8192eufw:111 -mrtwn-rtl8192eufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8192eufw.c" rtwn-rtl8192eufw.fwo optional rtwn-rtl8192eufw | rtwnfw \ dependency "rtwn-rtl8192eufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8192eufw.fwo" rtwn-rtl8192eufw.fw optional rtwn-rtl8192eufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8192eufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8192eufw.fw" rtwn-rtl8812aufw.c optional rtwn-rtl8812aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8812aufw.fw:rtwn-rtl8812aufw:111 -mrtwn-rtl8812aufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8812aufw.c" rtwn-rtl8812aufw.fwo optional rtwn-rtl8812aufw | rtwnfw \ dependency "rtwn-rtl8812aufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8812aufw.fwo" rtwn-rtl8812aufw.fw optional rtwn-rtl8812aufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8812aufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8812aufw.fw" rtwn-rtl8821aufw.c optional rtwn-rtl8821aufw | rtwnfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rtwn-rtl8821aufw.fw:rtwn-rtl8821aufw:111 -mrtwn-rtl8821aufw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rtwn-rtl8821aufw.c" rtwn-rtl8821aufw.fwo optional rtwn-rtl8821aufw | rtwnfw \ dependency "rtwn-rtl8821aufw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rtwn-rtl8821aufw.fwo" rtwn-rtl8821aufw.fw optional rtwn-rtl8821aufw | rtwnfw \ dependency "$S/contrib/dev/rtwn/rtwn-rtl8821aufw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rtwn-rtl8821aufw.fw" dev/safe/safe.c optional safe dev/scc/scc_if.m optional scc dev/scc/scc_bfe_ebus.c optional scc ebus dev/scc/scc_bfe_quicc.c optional scc quicc dev/scc/scc_bfe_sbus.c optional scc fhc | scc sbus dev/scc/scc_core.c optional scc dev/scc/scc_dev_quicc.c optional scc quicc dev/scc/scc_dev_sab82532.c optional scc dev/scc/scc_dev_z8530.c optional scc dev/sdhci/sdhci.c optional sdhci dev/sdhci/sdhci_fdt.c optional sdhci fdt dev/sdhci/sdhci_fdt_gpio.c optional sdhci fdt gpio dev/sdhci/sdhci_if.m optional sdhci dev/sdhci/sdhci_acpi.c optional sdhci acpi dev/sdhci/sdhci_pci.c optional sdhci pci dev/sdio/sdio_if.m optional mmccam dev/sdio/sdio_subr.c optional mmccam dev/sdio/sdiob.c optional mmccam dev/sge/if_sge.c optional sge pci dev/siis/siis.c optional siis pci dev/sis/if_sis.c optional sis pci dev/sk/if_sk.c optional sk pci dev/smbus/smb.c optional smb dev/smbus/smbconf.c optional smbus dev/smbus/smbus.c optional smbus dev/smbus/smbus_if.m optional smbus dev/smc/if_smc.c optional smc dev/smc/if_smc_fdt.c optional smc fdt dev/snp/snp.c optional snp dev/sound/clone.c optional sound dev/sound/unit.c optional sound dev/sound/isa/ad1816.c optional snd_ad1816 isa dev/sound/isa/ess.c optional snd_ess isa dev/sound/isa/gusc.c optional snd_gusc isa dev/sound/isa/mss.c optional snd_mss isa dev/sound/isa/sb16.c optional snd_sb16 isa dev/sound/isa/sb8.c optional snd_sb8 isa dev/sound/isa/sbc.c optional snd_sbc isa dev/sound/isa/sndbuf_dma.c optional sound isa dev/sound/pci/als4000.c optional snd_als4000 pci dev/sound/pci/atiixp.c optional snd_atiixp pci dev/sound/pci/cmi.c optional snd_cmi pci dev/sound/pci/cs4281.c optional snd_cs4281 pci dev/sound/pci/csa.c optional snd_csa pci dev/sound/pci/csapcm.c optional snd_csa pci dev/sound/pci/ds1.c optional snd_ds1 pci dev/sound/pci/emu10k1.c optional snd_emu10k1 pci dev/sound/pci/emu10kx.c optional snd_emu10kx pci dev/sound/pci/emu10kx-pcm.c optional snd_emu10kx pci dev/sound/pci/emu10kx-midi.c optional snd_emu10kx pci dev/sound/pci/envy24.c optional snd_envy24 pci dev/sound/pci/envy24ht.c optional snd_envy24ht pci dev/sound/pci/es137x.c optional snd_es137x pci dev/sound/pci/fm801.c optional snd_fm801 pci dev/sound/pci/ich.c optional snd_ich pci dev/sound/pci/maestro.c optional snd_maestro pci dev/sound/pci/maestro3.c optional snd_maestro3 pci dev/sound/pci/neomagic.c optional snd_neomagic pci dev/sound/pci/solo.c optional snd_solo pci dev/sound/pci/spicds.c optional snd_spicds pci dev/sound/pci/t4dwave.c optional snd_t4dwave pci dev/sound/pci/via8233.c optional snd_via8233 pci dev/sound/pci/via82c686.c optional snd_via82c686 pci dev/sound/pci/vibes.c optional snd_vibes pci dev/sound/pci/hda/hdaa.c optional snd_hda pci dev/sound/pci/hda/hdaa_patches.c optional snd_hda pci dev/sound/pci/hda/hdac.c optional snd_hda pci dev/sound/pci/hda/hdac_if.m optional snd_hda pci dev/sound/pci/hda/hdacc.c optional snd_hda pci dev/sound/pci/hdspe.c optional snd_hdspe pci dev/sound/pci/hdspe-pcm.c optional snd_hdspe pci dev/sound/pcm/ac97.c optional sound dev/sound/pcm/ac97_if.m optional sound dev/sound/pcm/ac97_patch.c optional sound dev/sound/pcm/buffer.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/channel.c optional sound dev/sound/pcm/channel_if.m optional sound dev/sound/pcm/dsp.c optional sound dev/sound/pcm/feeder.c optional sound dev/sound/pcm/feeder_chain.c optional sound dev/sound/pcm/feeder_eq.c optional sound \ dependency "feeder_eq_gen.h" \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_if.m optional sound dev/sound/pcm/feeder_format.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_matrix.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_mixer.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_rate.c optional sound \ dependency "feeder_rate_gen.h" \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/feeder_volume.c optional sound \ dependency "snd_fxdiv_gen.h" dev/sound/pcm/mixer.c optional sound dev/sound/pcm/mixer_if.m optional sound dev/sound/pcm/sndstat.c optional sound dev/sound/pcm/sound.c optional sound dev/sound/pcm/vchan.c optional sound dev/sound/usb/uaudio.c optional snd_uaudio usb dev/sound/usb/uaudio_pcm.c optional snd_uaudio usb dev/sound/midi/midi.c optional sound dev/sound/midi/mpu401.c optional sound dev/sound/midi/mpu_if.m optional sound dev/sound/midi/mpufoi_if.m optional sound dev/sound/midi/sequencer.c optional sound dev/sound/midi/synth_if.m optional sound dev/spibus/ofw_spibus.c optional fdt spibus dev/spibus/spibus.c optional spibus \ dependency "spibus_if.h" dev/spibus/spigen.c optional spigen dev/spibus/spibus_if.m optional spibus dev/ste/if_ste.c optional ste pci dev/stge/if_stge.c optional stge dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" dev/syscons/blank/blank_saver.c optional blank_saver dev/syscons/daemon/daemon_saver.c optional daemon_saver dev/syscons/dragon/dragon_saver.c optional dragon_saver dev/syscons/fade/fade_saver.c optional fade_saver dev/syscons/fire/fire_saver.c optional fire_saver dev/syscons/green/green_saver.c optional green_saver dev/syscons/logo/logo.c optional logo_saver dev/syscons/logo/logo_saver.c optional logo_saver dev/syscons/rain/rain_saver.c optional rain_saver dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc dev/syscons/scterm.c optional sc dev/syscons/scterm-dumb.c optional sc !SC_NO_TERM_DUMB dev/syscons/scterm-sc.c optional sc !SC_NO_TERM_SC dev/syscons/scterm-teken.c optional sc !SC_NO_TERM_TEKEN dev/syscons/scvidctl.c optional sc dev/syscons/scvtb.c optional sc dev/syscons/snake/snake_saver.c optional snake_saver dev/syscons/star/star_saver.c optional star_saver dev/syscons/syscons.c optional sc dev/syscons/sysmouse.c optional sc dev/syscons/warp/warp_saver.c optional warp_saver dev/tcp_log/tcp_log_dev.c optional tcp_blackbox inet | tcp_blackbox inet6 dev/tdfx/tdfx_linux.c optional tdfx_linux tdfx compat_linux dev/tdfx/tdfx_pci.c optional tdfx pci dev/ti/if_ti.c optional ti pci dev/trm/trm.c optional trm dev/twa/tw_cl_init.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_intr.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_io.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_cl_misc.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_osl_cam.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twa/tw_osl_freebsd.c optional twa \ compile-with "${NORMAL_C} -I$S/dev/twa" dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe dev/tws/tws.c optional tws dev/tws/tws_cam.c optional tws dev/tws/tws_hdm.c optional tws dev/tws/tws_services.c optional tws dev/tws/tws_user.c optional tws dev/uart/uart_bus_acpi.c optional uart acpi dev/uart/uart_bus_ebus.c optional uart ebus dev/uart/uart_bus_fdt.c optional uart fdt dev/uart/uart_bus_isa.c optional uart isa dev/uart/uart_bus_pccard.c optional uart pccard dev/uart/uart_bus_pci.c optional uart pci dev/uart/uart_bus_puc.c optional uart puc dev/uart/uart_bus_scc.c optional uart scc dev/uart/uart_core.c optional uart dev/uart/uart_cpu_acpi.c optional uart acpi dev/uart/uart_dbg.c optional uart gdb dev/uart/uart_dev_msm.c optional uart uart_msm fdt dev/uart/uart_dev_mvebu.c optional uart uart_mvebu dev/uart/uart_dev_ns8250.c optional uart uart_ns8250 | uart uart_snps dev/uart/uart_dev_pl011.c optional uart pl011 dev/uart/uart_dev_quicc.c optional uart quicc dev/uart/uart_dev_sab82532.c optional uart uart_sab82532 | uart scc dev/uart/uart_dev_snps.c optional uart uart_snps fdt dev/uart/uart_dev_z8530.c optional uart uart_z8530 | uart scc dev/uart/uart_if.m optional uart dev/uart/uart_subr.c optional uart dev/uart/uart_tty.c optional uart dev/ubsec/ubsec.c optional ubsec # # USB controller drivers # dev/usb/controller/musb_otg.c optional musb dev/usb/controller/dwc_otg.c optional dwcotg dev/usb/controller/dwc_otg_fdt.c optional dwcotg fdt dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_msm.c optional ehci_msm fdt dev/usb/controller/ehci_pci.c optional ehci pci dev/usb/controller/ohci.c optional ohci dev/usb/controller/ohci_pci.c optional ohci pci dev/usb/controller/uhci.c optional uhci dev/usb/controller/uhci_pci.c optional uhci pci dev/usb/controller/xhci.c optional xhci dev/usb/controller/xhci_pci.c optional xhci pci dev/usb/controller/saf1761_otg.c optional saf1761otg dev/usb/controller/saf1761_otg_fdt.c optional saf1761otg fdt dev/usb/controller/uss820dci.c optional uss820dci dev/usb/controller/usb_controller.c optional usb # # USB storage drivers # dev/usb/storage/cfumass.c optional cfumass ctl dev/usb/storage/umass.c optional umass dev/usb/storage/urio.c optional urio dev/usb/storage/ustorage_fs.c optional usfs # # USB core # dev/usb/usb_busdma.c optional usb dev/usb/usb_core.c optional usb dev/usb/usb_debug.c optional usb dev/usb/usb_dev.c optional usb dev/usb/usb_device.c optional usb dev/usb/usb_dynamic.c optional usb dev/usb/usb_error.c optional usb dev/usb/usb_fdt_support.c optional usb fdt dev/usb/usb_generic.c optional usb dev/usb/usb_handle_request.c optional usb dev/usb/usb_hid.c optional usb dev/usb/usb_hub.c optional usb dev/usb/usb_hub_acpi.c optional uacpi acpi dev/usb/usb_if.m optional usb dev/usb/usb_lookup.c optional usb dev/usb/usb_mbuf.c optional usb dev/usb/usb_msctest.c optional usb dev/usb/usb_parse.c optional usb dev/usb/usb_pf.c optional usb dev/usb/usb_process.c optional usb dev/usb/usb_request.c optional usb dev/usb/usb_transfer.c optional usb dev/usb/usb_util.c optional usb # # USB network drivers # dev/usb/net/if_aue.c optional aue dev/usb/net/if_axe.c optional axe dev/usb/net/if_axge.c optional axge dev/usb/net/if_cdce.c optional cdce dev/usb/net/if_cdceem.c optional cdceem dev/usb/net/if_cue.c optional cue dev/usb/net/if_ipheth.c optional ipheth dev/usb/net/if_kue.c optional kue dev/usb/net/if_mos.c optional mos dev/usb/net/if_muge.c optional muge dev/usb/net/if_rue.c optional rue dev/usb/net/if_smsc.c optional smsc dev/usb/net/if_udav.c optional udav dev/usb/net/if_ure.c optional ure dev/usb/net/if_usie.c optional usie dev/usb/net/if_urndis.c optional urndis dev/usb/net/ruephy.c optional rue dev/usb/net/usb_ethernet.c optional uether | aue | axe | axge | cdce | \ cdceem | cue | ipheth | kue | mos | \ rue | smsc | udav | ure | urndis | muge dev/usb/net/uhso.c optional uhso # # USB WLAN drivers # dev/usb/wlan/if_rsu.c optional rsu rsu-rtl8712fw.c optional rsu-rtl8712fw | rsufw \ compile-with "${AWK} -f $S/tools/fw_stub.awk rsu-rtl8712fw.fw:rsu-rtl8712fw:120 -mrsu-rtl8712fw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "rsu-rtl8712fw.c" rsu-rtl8712fw.fwo optional rsu-rtl8712fw | rsufw \ dependency "rsu-rtl8712fw.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "rsu-rtl8712fw.fwo" rsu-rtl8712fw.fw optional rsu-rtl8712.fw | rsufw \ dependency "$S/contrib/dev/rsu/rsu-rtl8712fw.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "rsu-rtl8712fw.fw" dev/usb/wlan/if_rum.c optional rum dev/usb/wlan/if_run.c optional run runfw.c optional runfw \ compile-with "${AWK} -f $S/tools/fw_stub.awk run.fw:runfw -mrunfw -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "runfw.c" runfw.fwo optional runfw \ dependency "run.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "runfw.fwo" run.fw optional runfw \ dependency "$S/contrib/dev/run/rt2870.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "run.fw" dev/usb/wlan/if_uath.c optional uath dev/usb/wlan/if_upgt.c optional upgt dev/usb/wlan/if_ural.c optional ural dev/usb/wlan/if_urtw.c optional urtw dev/usb/wlan/if_zyd.c optional zyd # # USB serial and parallel port drivers # dev/usb/serial/u3g.c optional u3g dev/usb/serial/uark.c optional uark dev/usb/serial/ubsa.c optional ubsa dev/usb/serial/ubser.c optional ubser dev/usb/serial/uchcom.c optional uchcom dev/usb/serial/ucycom.c optional ucycom dev/usb/serial/ufoma.c optional ufoma dev/usb/serial/uftdi.c optional uftdi dev/usb/serial/ugensa.c optional ugensa dev/usb/serial/uipaq.c optional uipaq dev/usb/serial/ulpt.c optional ulpt dev/usb/serial/umcs.c optional umcs dev/usb/serial/umct.c optional umct dev/usb/serial/umodem.c optional umodem dev/usb/serial/umoscom.c optional umoscom dev/usb/serial/uplcom.c optional uplcom dev/usb/serial/uslcom.c optional uslcom dev/usb/serial/uvisor.c optional uvisor dev/usb/serial/uvscom.c optional uvscom dev/usb/serial/usb_serial.c optional ucom | u3g | uark | ubsa | ubser | \ uchcom | ucycom | ufoma | uftdi | \ ugensa | uipaq | umcs | umct | \ umodem | umoscom | uplcom | usie | \ uslcom | uvisor | uvscom # # USB misc drivers # dev/usb/misc/ufm.c optional ufm dev/usb/misc/udbp.c optional udbp dev/usb/misc/ugold.c optional ugold dev/usb/misc/uled.c optional uled # # USB input drivers # dev/usb/input/atp.c optional atp dev/usb/input/uep.c optional uep dev/usb/input/uhid.c optional uhid dev/usb/input/uhid_snes.c optional uhid_snes dev/usb/input/ukbd.c optional ukbd dev/usb/input/ums.c optional ums dev/usb/input/wmt.c optional wmt dev/usb/input/wsp.c optional wsp # # USB quirks # dev/usb/quirk/usb_quirk.c optional usb # # USB templates # dev/usb/template/usb_template.c optional usb_template dev/usb/template/usb_template_audio.c optional usb_template dev/usb/template/usb_template_cdce.c optional usb_template dev/usb/template/usb_template_kbd.c optional usb_template dev/usb/template/usb_template_modem.c optional usb_template dev/usb/template/usb_template_mouse.c optional usb_template dev/usb/template/usb_template_msc.c optional usb_template dev/usb/template/usb_template_mtp.c optional usb_template dev/usb/template/usb_template_phone.c optional usb_template dev/usb/template/usb_template_serialnet.c optional usb_template dev/usb/template/usb_template_midi.c optional usb_template dev/usb/template/usb_template_multi.c optional usb_template dev/usb/template/usb_template_cdceem.c optional usb_template # # USB video drivers # dev/usb/video/udl.c optional udl # # USB END # dev/videomode/videomode.c optional videomode dev/videomode/edid.c optional videomode dev/videomode/pickmode.c optional videomode dev/videomode/vesagtf.c optional videomode dev/veriexec/verified_exec.c optional veriexec mac_veriexec dev/vge/if_vge.c optional vge dev/viapm/viapm.c optional viapm pci dev/virtio/virtio.c optional virtio dev/virtio/virtqueue.c optional virtio dev/virtio/virtio_bus_if.m optional virtio dev/virtio/virtio_if.m optional virtio dev/virtio/pci/virtio_pci.c optional virtio_pci dev/virtio/mmio/virtio_mmio.c optional virtio_mmio dev/virtio/mmio/virtio_mmio_acpi.c optional virtio_mmio acpi dev/virtio/mmio/virtio_mmio_fdt.c optional virtio_mmio fdt dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio dev/virtio/network/if_vtnet.c optional vtnet dev/virtio/block/virtio_blk.c optional virtio_blk dev/virtio/balloon/virtio_balloon.c optional virtio_balloon dev/virtio/scsi/virtio_scsi.c optional virtio_scsi dev/virtio/random/virtio_random.c optional virtio_random dev/virtio/console/virtio_console.c optional virtio_console dev/vkbd/vkbd.c optional vkbd dev/vr/if_vr.c optional vr pci dev/vt/colors/vt_termcolors.c optional vt dev/vt/font/vt_font_default.c optional vt dev/vt/font/vt_mouse_cursor.c optional vt dev/vt/hw/efifb/efifb.c optional vt_efifb dev/vt/hw/fb/vt_fb.c optional vt dev/vt/hw/vga/vt_vga.c optional vt vt_vga dev/vt/logo/logo_freebsd.c optional vt splash dev/vt/logo/logo_beastie.c optional vt splash dev/vt/vt_buf.c optional vt dev/vt/vt_consolectl.c optional vt dev/vt/vt_core.c optional vt dev/vt/vt_cpulogos.c optional vt splash dev/vt/vt_font.c optional vt dev/vt/vt_sysmouse.c optional vt dev/vte/if_vte.c optional vte pci dev/watchdog/watchdog.c standard dev/wi/if_wi.c optional wi dev/wi/if_wi_pccard.c optional wi pccard dev/wi/if_wi_pci.c optional wi pci dev/wpi/if_wpi.c optional wpi pci wpifw.c optional wpifw \ compile-with "${AWK} -f $S/tools/fw_stub.awk wpi.fw:wpifw:153229 -mwpi -c${.TARGET}" \ no-implicit-rule before-depend local \ clean "wpifw.c" wpifw.fwo optional wpifw \ dependency "wpi.fw" \ compile-with "${NORMAL_FWO}" \ no-implicit-rule \ clean "wpifw.fwo" wpi.fw optional wpifw \ dependency "$S/contrib/dev/wpi/iwlwifi-3945-15.32.2.9.fw.uu" \ compile-with "${NORMAL_FW}" \ no-obj no-implicit-rule \ clean "wpi.fw" dev/xdma/controller/pl330.c optional xdma pl330 dev/xdma/xdma.c optional xdma dev/xdma/xdma_bank.c optional xdma dev/xdma/xdma_bio.c optional xdma dev/xdma/xdma_fdt_test.c optional xdma xdma_test fdt dev/xdma/xdma_if.m optional xdma dev/xdma/xdma_iommu.c optional xdma dev/xdma/xdma_mbuf.c optional xdma dev/xdma/xdma_queue.c optional xdma dev/xdma/xdma_sg.c optional xdma dev/xdma/xdma_sglist.c optional xdma dev/xen/balloon/balloon.c optional xenhvm dev/xen/blkfront/blkfront.c optional xenhvm dev/xen/blkback/blkback.c optional xenhvm dev/xen/console/xen_console.c optional xenhvm dev/xen/control/control.c optional xenhvm dev/xen/grant_table/grant_table.c optional xenhvm dev/xen/netback/netback.c optional xenhvm dev/xen/netfront/netfront.c optional xenhvm dev/xen/xenpci/xenpci.c optional xenpci dev/xen/timer/timer.c optional xenhvm dev/xen/pvcpu/pvcpu.c optional xenhvm dev/xen/xenstore/xenstore.c optional xenhvm dev/xen/xenstore/xenstore_dev.c optional xenhvm dev/xen/xenstore/xenstored_dev.c optional xenhvm dev/xen/evtchn/evtchn_dev.c optional xenhvm dev/xen/privcmd/privcmd.c optional xenhvm dev/xen/gntdev/gntdev.c optional xenhvm dev/xen/debug/debug.c optional xenhvm dev/xl/if_xl.c optional xl pci dev/xl/xlphy.c optional xl pci fs/autofs/autofs.c optional autofs fs/autofs/autofs_vfsops.c optional autofs fs/autofs/autofs_vnops.c optional autofs fs/deadfs/dead_vnops.c standard fs/devfs/devfs_devs.c standard fs/devfs/devfs_dir.c standard fs/devfs/devfs_rule.c standard fs/devfs/devfs_vfsops.c standard fs/devfs/devfs_vnops.c standard fs/fdescfs/fdesc_vfsops.c optional fdescfs fs/fdescfs/fdesc_vnops.c optional fdescfs fs/fifofs/fifo_vnops.c standard fs/cuse/cuse.c optional cuse fs/fuse/fuse_device.c optional fusefs fs/fuse/fuse_file.c optional fusefs fs/fuse/fuse_internal.c optional fusefs fs/fuse/fuse_io.c optional fusefs fs/fuse/fuse_ipc.c optional fusefs fs/fuse/fuse_main.c optional fusefs fs/fuse/fuse_node.c optional fusefs fs/fuse/fuse_vfsops.c optional fusefs fs/fuse/fuse_vnops.c optional fusefs fs/msdosfs/msdosfs_conv.c optional msdosfs fs/msdosfs/msdosfs_denode.c optional msdosfs fs/msdosfs/msdosfs_fat.c optional msdosfs fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs fs/nfs/nfs_commonkrpc.c optional nfscl | nfsd fs/nfs/nfs_commonsubs.c optional nfscl | nfsd fs/nfs/nfs_commonport.c optional nfscl | nfsd fs/nfs/nfs_commonacl.c optional nfscl | nfsd fs/nfsclient/nfs_clcomsubs.c optional nfscl fs/nfsclient/nfs_clsubs.c optional nfscl fs/nfsclient/nfs_clstate.c optional nfscl fs/nfsclient/nfs_clkrpc.c optional nfscl fs/nfsclient/nfs_clrpcops.c optional nfscl fs/nfsclient/nfs_clvnops.c optional nfscl fs/nfsclient/nfs_clnode.c optional nfscl fs/nfsclient/nfs_clvfsops.c optional nfscl fs/nfsclient/nfs_clport.c optional nfscl fs/nfsclient/nfs_clbio.c optional nfscl fs/nfsclient/nfs_clnfsiod.c optional nfscl fs/nfsserver/nfs_fha_new.c optional nfsd inet fs/nfsserver/nfs_nfsdsocket.c optional nfsd inet fs/nfsserver/nfs_nfsdsubs.c optional nfsd inet fs/nfsserver/nfs_nfsdstate.c optional nfsd inet fs/nfsserver/nfs_nfsdkrpc.c optional nfsd inet fs/nfsserver/nfs_nfsdserv.c optional nfsd inet fs/nfsserver/nfs_nfsdport.c optional nfsd inet fs/nfsserver/nfs_nfsdcache.c optional nfsd inet fs/nullfs/null_subr.c optional nullfs fs/nullfs/null_vfsops.c optional nullfs fs/nullfs/null_vnops.c optional nullfs fs/procfs/procfs.c optional procfs fs/procfs/procfs_dbregs.c optional procfs fs/procfs/procfs_fpregs.c optional procfs fs/procfs/procfs_ioctl.c optional procfs fs/procfs/procfs_map.c optional procfs fs/procfs/procfs_mem.c optional procfs fs/procfs/procfs_note.c optional procfs fs/procfs/procfs_osrel.c optional procfs fs/procfs/procfs_regs.c optional procfs fs/procfs/procfs_rlimit.c optional procfs fs/procfs/procfs_status.c optional procfs fs/procfs/procfs_type.c optional procfs fs/pseudofs/pseudofs.c optional pseudofs fs/pseudofs/pseudofs_fileno.c optional pseudofs fs/pseudofs/pseudofs_vncache.c optional pseudofs fs/pseudofs/pseudofs_vnops.c optional pseudofs fs/smbfs/smbfs_io.c optional smbfs fs/smbfs/smbfs_node.c optional smbfs fs/smbfs/smbfs_smb.c optional smbfs fs/smbfs/smbfs_subr.c optional smbfs fs/smbfs/smbfs_vfsops.c optional smbfs fs/smbfs/smbfs_vnops.c optional smbfs fs/udf/osta.c optional udf fs/udf/udf_iconv.c optional udf_iconv fs/udf/udf_vfsops.c optional udf fs/udf/udf_vnops.c optional udf fs/unionfs/union_subr.c optional unionfs fs/unionfs/union_vfsops.c optional unionfs fs/unionfs/union_vnops.c optional unionfs fs/tmpfs/tmpfs_vnops.c optional tmpfs fs/tmpfs/tmpfs_fifoops.c optional tmpfs fs/tmpfs/tmpfs_vfsops.c optional tmpfs fs/tmpfs/tmpfs_subr.c optional tmpfs gdb/gdb_cons.c optional gdb gdb/gdb_main.c optional gdb gdb/gdb_packet.c optional gdb geom/bde/g_bde.c optional geom_bde geom/bde/g_bde_crypt.c optional geom_bde geom/bde/g_bde_lock.c optional geom_bde geom/bde/g_bde_work.c optional geom_bde geom/cache/g_cache.c optional geom_cache geom/concat/g_concat.c optional geom_concat geom/eli/g_eli.c optional geom_eli geom/eli/g_eli_crypto.c optional geom_eli geom/eli/g_eli_ctl.c optional geom_eli geom/eli/g_eli_hmac.c optional geom_eli geom/eli/g_eli_integrity.c optional geom_eli geom/eli/g_eli_key.c optional geom_eli geom/eli/g_eli_key_cache.c optional geom_eli geom/eli/g_eli_privacy.c optional geom_eli geom/eli/pkcs5v2.c optional geom_eli geom/gate/g_gate.c optional geom_gate geom/geom_bsd_enc.c optional geom_part_bsd geom/geom_ccd.c optional ccd | geom_ccd geom/geom_ctl.c standard geom/geom_dev.c standard geom/geom_disk.c standard geom/geom_dump.c standard geom/geom_event.c standard geom/geom_flashmap.c optional fdt cfi | fdt mx25l | mmcsd | fdt n25q | fdt at45d geom/geom_io.c standard geom/geom_kern.c standard geom/geom_map.c optional geom_map geom/geom_redboot.c optional geom_redboot geom/geom_slice.c standard geom/geom_subr.c standard geom/geom_vfs.c standard geom/journal/g_journal.c optional geom_journal geom/journal/g_journal_ufs.c optional geom_journal geom/label/g_label.c optional geom_label | geom_label_gpt geom/label/g_label_ext2fs.c optional geom_label geom/label/g_label_flashmap.c optional geom_label geom/label/g_label_iso9660.c optional geom_label geom/label/g_label_msdosfs.c optional geom_label geom/label/g_label_ntfs.c optional geom_label geom/label/g_label_reiserfs.c optional geom_label geom/label/g_label_ufs.c optional geom_label geom/label/g_label_gpt.c optional geom_label | geom_label_gpt geom/label/g_label_disk_ident.c optional geom_label geom/linux_lvm/g_linux_lvm.c optional geom_linux_lvm geom/mirror/g_mirror.c optional geom_mirror geom/mirror/g_mirror_ctl.c optional geom_mirror geom/mountver/g_mountver.c optional geom_mountver geom/multipath/g_multipath.c optional geom_multipath geom/nop/g_nop.c optional geom_nop geom/part/g_part.c standard geom/part/g_part_if.m standard geom/part/g_part_apm.c optional geom_part_apm geom/part/g_part_bsd.c optional geom_part_bsd geom/part/g_part_bsd64.c optional geom_part_bsd64 geom/part/g_part_ebr.c optional geom_part_ebr geom/part/g_part_gpt.c optional geom_part_gpt geom/part/g_part_ldm.c optional geom_part_ldm geom/part/g_part_mbr.c optional geom_part_mbr geom/part/g_part_vtoc8.c optional geom_part_vtoc8 geom/raid/g_raid.c optional geom_raid geom/raid/g_raid_ctl.c optional geom_raid geom/raid/g_raid_md_if.m optional geom_raid geom/raid/g_raid_tr_if.m optional geom_raid geom/raid/md_ddf.c optional geom_raid geom/raid/md_intel.c optional geom_raid geom/raid/md_jmicron.c optional geom_raid geom/raid/md_nvidia.c optional geom_raid geom/raid/md_promise.c optional geom_raid geom/raid/md_sii.c optional geom_raid geom/raid/tr_concat.c optional geom_raid geom/raid/tr_raid0.c optional geom_raid geom/raid/tr_raid1.c optional geom_raid geom/raid/tr_raid1e.c optional geom_raid geom/raid/tr_raid5.c optional geom_raid geom/raid3/g_raid3.c optional geom_raid3 geom/raid3/g_raid3_ctl.c optional geom_raid3 geom/shsec/g_shsec.c optional geom_shsec geom/stripe/g_stripe.c optional geom_stripe geom/uzip/g_uzip.c optional geom_uzip geom/uzip/g_uzip_lzma.c optional geom_uzip geom/uzip/g_uzip_wrkthr.c optional geom_uzip geom/uzip/g_uzip_zlib.c optional geom_uzip geom/uzip/g_uzip_zstd.c optional geom_uzip zstdio \ compile-with "${NORMAL_C} -I$S/contrib/zstd/lib/freebsd" geom/vinum/geom_vinum.c optional geom_vinum geom/vinum/geom_vinum_create.c optional geom_vinum geom/vinum/geom_vinum_drive.c optional geom_vinum geom/vinum/geom_vinum_plex.c optional geom_vinum geom/vinum/geom_vinum_volume.c optional geom_vinum geom/vinum/geom_vinum_subr.c optional geom_vinum geom/vinum/geom_vinum_raid5.c optional geom_vinum geom/vinum/geom_vinum_share.c optional geom_vinum geom/vinum/geom_vinum_list.c optional geom_vinum geom/vinum/geom_vinum_rm.c optional geom_vinum geom/vinum/geom_vinum_init.c optional geom_vinum geom/vinum/geom_vinum_state.c optional geom_vinum geom/vinum/geom_vinum_rename.c optional geom_vinum geom/vinum/geom_vinum_move.c optional geom_vinum geom/vinum/geom_vinum_events.c optional geom_vinum geom/virstor/binstream.c optional geom_virstor geom/virstor/g_virstor.c optional geom_virstor geom/virstor/g_virstor_md.c optional geom_virstor geom/zero/g_zero.c optional geom_zero fs/ext2fs/ext2_acl.c optional ext2fs fs/ext2fs/ext2_alloc.c optional ext2fs fs/ext2fs/ext2_balloc.c optional ext2fs fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_csum.c optional ext2fs fs/ext2fs/ext2_extattr.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs fs/ext2fs/ext2_hash.c optional ext2fs fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs fs/ext2fs/ext2_vnops.c optional ext2fs # isa/isa_if.m standard isa/isa_common.c optional isa isa/isahint.c optional isa isa/pnp.c optional isa isapnp isa/pnpparse.c optional isa isapnp fs/cd9660/cd9660_bmap.c optional cd9660 fs/cd9660/cd9660_lookup.c optional cd9660 fs/cd9660/cd9660_node.c optional cd9660 fs/cd9660/cd9660_rrip.c optional cd9660 fs/cd9660/cd9660_util.c optional cd9660 fs/cd9660/cd9660_vfsops.c optional cd9660 fs/cd9660/cd9660_vnops.c optional cd9660 fs/cd9660/cd9660_iconv.c optional cd9660_iconv gnu/gcov/gcc_4_7.c optional gcov \ warning "kernel contains GPL licensed gcov support" gnu/gcov/gcov_fs.c optional gcov lindebugfs \ compile-with "${LINUXKPI_C}" gnu/gcov/gcov_subr.c optional gcov kern/bus_if.m standard kern/clock_if.m standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_binmisc.c optional imagact_binmisc kern/imgact_elf.c standard kern/imgact_elf32.c optional compat_freebsd32 kern/imgact_shell.c standard kern/init_main.c standard kern/init_sysent.c standard kern/ksched.c optional _kposix_priority_scheduling kern/kern_acct.c standard kern/kern_alq.c optional alq kern/kern_clock.c standard kern/kern_condvar.c standard kern/kern_conf.c standard kern/kern_cons.c standard kern/kern_cpu.c standard kern/kern_cpuset.c standard kern/kern_context.c standard kern/kern_descrip.c standard kern/kern_dtrace.c optional kdtrace_hooks kern/kern_dump.c standard kern/kern_environment.c standard kern/kern_et.c standard kern/kern_event.c standard kern/kern_exec.c standard kern/kern_exit.c standard kern/kern_fail.c standard kern/kern_ffclock.c standard kern/kern_fork.c standard kern/kern_hhook.c standard kern/kern_idle.c standard kern/kern_intr.c standard kern/kern_jail.c standard kern/kern_kcov.c optional kcov \ compile-with "${NORMAL_C:N-fsanitize*}" kern/kern_khelp.c standard kern/kern_kthread.c standard kern/kern_ktr.c optional ktr kern/kern_ktrace.c standard kern/kern_linker.c standard kern/kern_lock.c standard kern/kern_lockf.c standard kern/kern_lockstat.c optional kdtrace_hooks kern/kern_loginclass.c standard kern/kern_malloc.c standard kern/kern_mbuf.c standard kern/kern_mib.c standard kern/kern_module.c standard kern/kern_mtxpool.c standard kern/kern_mutex.c standard kern/kern_ntptime.c standard kern/kern_osd.c standard kern/kern_physio.c standard kern/kern_pmc.c standard kern/kern_poll.c optional device_polling kern/kern_priv.c standard kern/kern_proc.c standard kern/kern_procctl.c standard kern/kern_prot.c standard kern/kern_racct.c standard kern/kern_rangelock.c standard kern/kern_rctl.c standard kern/kern_resource.c standard kern/kern_rmlock.c standard kern/kern_rwlock.c standard kern/kern_sdt.c optional kdtrace_hooks kern/kern_sema.c standard kern/kern_sendfile.c standard kern/kern_sharedpage.c standard kern/kern_shutdown.c standard kern/kern_sig.c standard kern/kern_switch.c standard kern/kern_sx.c standard kern/kern_synch.c standard kern/kern_syscalls.c standard kern/kern_sysctl.c standard kern/kern_tc.c standard kern/kern_thr.c standard kern/kern_thread.c standard kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_tslog.c optional tslog kern/kern_ubsan.c optional kubsan kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_xxx.c standard kern/link_elf.c standard kern/linker_if.m standard kern/md4c.c optional netsmb kern/md5c.c standard kern/p1003_1b.c standard kern/posix4_mib.c standard kern/sched_4bsd.c optional sched_4bsd kern/sched_ule.c optional sched_ule kern/serdev_if.m standard kern/stack_protector.c standard \ compile-with "${NORMAL_C:N-fstack-protector*}" kern/subr_acl_nfs4.c optional ufs_acl | zfs kern/subr_acl_posix1e.c optional ufs_acl kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_boot.c standard kern/subr_bus.c standard kern/subr_bus_dma.c standard kern/subr_bufring.c standard kern/subr_capability.c standard kern/subr_clock.c standard kern/subr_compressor.c standard \ compile-with "${NORMAL_C} -I$S/contrib/zstd/lib/freebsd" kern/subr_coverage.c optional coverage \ compile-with "${NORMAL_C:N-fsanitize*}" kern/subr_counter.c standard kern/subr_devstat.c standard kern/subr_disk.c standard kern/subr_early.c standard kern/subr_epoch.c standard kern/subr_eventhandler.c standard kern/subr_fattime.c standard kern/subr_firmware.c optional firmware kern/subr_filter.c standard kern/subr_gtaskqueue.c standard kern/subr_hash.c standard kern/subr_hints.c standard kern/subr_kdb.c standard kern/subr_kobj.c standard kern/subr_lock.c standard kern/subr_log.c standard kern/subr_mchain.c optional libmchain kern/subr_module.c standard kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard kern/subr_pctrie.c standard kern/subr_pidctrl.c standard kern/subr_power.c standard kern/subr_prf.c standard kern/subr_prof.c standard kern/subr_rangeset.c standard kern/subr_rman.c standard kern/subr_rtc.c standard kern/subr_sbuf.c standard kern/subr_scanf.c standard kern/subr_sglist.c standard kern/subr_sleepqueue.c standard kern/subr_smp.c standard kern/subr_stack.c optional ddb | stack | ktr +kern/subr_stats.c optional stats kern/subr_taskqueue.c standard kern/subr_terminal.c optional vt kern/subr_trap.c standard kern/subr_turnstile.c standard kern/subr_uio.c standard kern/subr_unit.c standard kern/subr_vmem.c standard kern/subr_witness.c optional witness kern/sys_capability.c standard kern/sys_generic.c standard kern/sys_getrandom.c standard kern/sys_pipe.c standard kern/sys_procdesc.c standard kern/sys_process.c standard kern/sys_socket.c standard kern/syscalls.c standard kern/sysv_ipc.c standard kern/sysv_msg.c optional sysvmsg kern/sysv_sem.c optional sysvsem kern/sysv_shm.c optional sysvshm kern/tty.c standard kern/tty_compat.c optional compat_43tty kern/tty_info.c standard kern/tty_inq.c standard kern/tty_outq.c standard kern/tty_pts.c standard kern/tty_tty.c standard kern/tty_ttydisc.c standard kern/uipc_accf.c standard kern/uipc_debug.c optional ddb kern/uipc_domain.c standard kern/uipc_ktls.c optional kern_tls kern/uipc_mbuf.c standard kern/uipc_mbuf2.c standard kern/uipc_mbufhash.c standard kern/uipc_mqueue.c optional p1003_1b_mqueue kern/uipc_sem.c optional p1003_1b_semaphores kern/uipc_shm.c standard kern/uipc_sockbuf.c standard kern/uipc_socket.c standard kern/uipc_syscalls.c standard kern/uipc_usrreq.c standard kern/vfs_acl.c standard kern/vfs_aio.c standard kern/vfs_bio.c standard kern/vfs_cache.c standard kern/vfs_cluster.c standard kern/vfs_default.c standard kern/vfs_export.c standard kern/vfs_extattr.c standard kern/vfs_hash.c standard kern/vfs_init.c standard kern/vfs_lookup.c standard kern/vfs_mount.c standard kern/vfs_mountroot.c standard kern/vfs_subr.c standard kern/vfs_syscalls.c standard kern/vfs_vnops.c standard # # Kernel GSS-API # gssd.h optional kgssapi \ dependency "$S/kgssapi/gssd.x" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \ no-obj no-implicit-rule before-depend local \ clean "gssd.h" gssd_xdr.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ no-implicit-rule before-depend local \ clean "gssd_xdr.c" gssd_clnt.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ compile-with "RPCGEN_CPP='${CPP}' rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ no-implicit-rule before-depend local \ clean "gssd_clnt.c" kgssapi/gss_accept_sec_context.c optional kgssapi kgssapi/gss_add_oid_set_member.c optional kgssapi kgssapi/gss_acquire_cred.c optional kgssapi kgssapi/gss_canonicalize_name.c optional kgssapi kgssapi/gss_create_empty_oid_set.c optional kgssapi kgssapi/gss_delete_sec_context.c optional kgssapi kgssapi/gss_display_status.c optional kgssapi kgssapi/gss_export_name.c optional kgssapi kgssapi/gss_get_mic.c optional kgssapi kgssapi/gss_init_sec_context.c optional kgssapi kgssapi/gss_impl.c optional kgssapi kgssapi/gss_import_name.c optional kgssapi kgssapi/gss_names.c optional kgssapi kgssapi/gss_pname_to_uid.c optional kgssapi kgssapi/gss_release_buffer.c optional kgssapi kgssapi/gss_release_cred.c optional kgssapi kgssapi/gss_release_name.c optional kgssapi kgssapi/gss_release_oid_set.c optional kgssapi kgssapi/gss_set_cred_option.c optional kgssapi kgssapi/gss_test_oid_set_member.c optional kgssapi kgssapi/gss_unwrap.c optional kgssapi kgssapi/gss_verify_mic.c optional kgssapi kgssapi/gss_wrap.c optional kgssapi kgssapi/gss_wrap_size_limit.c optional kgssapi kgssapi/gssd_prot.c optional kgssapi kgssapi/krb5/krb5_mech.c optional kgssapi kgssapi/krb5/kcrypto.c optional kgssapi kgssapi/krb5/kcrypto_aes.c optional kgssapi kgssapi/krb5/kcrypto_arcfour.c optional kgssapi kgssapi/krb5/kcrypto_des.c optional kgssapi kgssapi/krb5/kcrypto_des3.c optional kgssapi kgssapi/kgss_if.m optional kgssapi kgssapi/gsstest.c optional kgssapi_debug # These files in libkern/ are those needed by all architectures. Some # of the files in libkern/ are only needed on some architectures, e.g., # libkern/divdi3.c is needed by i386 but not alpha. Also, some of these # routines may be optimized for a particular platform. In either case, # the file should be moved to conf/files. from here. # libkern/arc4random.c standard libkern/asprintf.c standard libkern/bcd.c standard libkern/bsearch.c standard libkern/explicit_bzero.c standard libkern/fnmatch.c standard libkern/gsb_crc32.c standard libkern/iconv.c optional libiconv libkern/iconv_converter_if.m optional libiconv libkern/iconv_ucs.c optional libiconv libkern/iconv_xlat.c optional libiconv libkern/iconv_xlat16.c optional libiconv libkern/inet_aton.c standard libkern/inet_ntoa.c standard libkern/inet_ntop.c standard libkern/inet_pton.c standard libkern/jenkins_hash.c standard libkern/murmur3_32.c standard libkern/mcount.c optional profiling-routine libkern/memcchr.c standard libkern/memchr.c standard libkern/memmem.c optional gdb libkern/qsort.c standard libkern/qsort_r.c standard libkern/random.c standard libkern/scanc.c standard libkern/strcasecmp.c standard libkern/strcat.c standard libkern/strchr.c standard libkern/strchrnul.c optional gdb libkern/strcmp.c standard libkern/strcpy.c standard libkern/strcspn.c standard libkern/strdup.c standard libkern/strndup.c standard libkern/strlcat.c standard libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncat.c standard libkern/strncmp.c standard libkern/strncpy.c standard libkern/strnlen.c standard libkern/strrchr.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard libkern/strtol.c standard libkern/strtoq.c standard libkern/strtoul.c standard libkern/strtouq.c standard libkern/strvalid.c standard libkern/timingsafe_bcmp.c standard contrib/zlib/adler32.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/compress.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/crc32.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/deflate.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/inffast.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/inflate.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/inftrees.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/trees.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib contrib/zlib/uncompr.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib \ compile-with "${NORMAL_C} -Wno-cast-qual" contrib/zlib/zutil.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib dev/zlib/zlib_mod.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib dev/zlib/zcalloc.c optional crypto | geom_uzip | ipsec | \ ipsec_support | mxge | ddb_ctf | gzio | zfs | zlib net/altq/altq_cbq.c optional altq net/altq/altq_codel.c optional altq net/altq/altq_hfsc.c optional altq net/altq/altq_fairq.c optional altq net/altq/altq_priq.c optional altq net/altq/altq_red.c optional altq net/altq/altq_rio.c optional altq net/altq/altq_rmclass.c optional altq net/altq/altq_subr.c optional altq net/bpf.c standard net/bpf_buffer.c optional bpf net/bpf_jitter.c optional bpf_jitter net/bpf_filter.c optional bpf | netgraph_bpf net/bpf_zerocopy.c optional bpf net/bridgestp.c optional bridge | if_bridge net/ieee8023ad_lacp.c optional lagg net/if.c standard net/if_bridge.c optional bridge inet | if_bridge inet net/if_clone.c standard net/if_dead.c standard net/if_debug.c optional ddb net/if_disc.c optional disc net/if_edsc.c optional edsc net/if_enc.c optional enc inet | enc inet6 net/if_epair.c optional epair net/if_ethersubr.c optional ether net/if_fwsubr.c optional fwip net/if_gif.c optional gif inet | gif inet6 | \ netgraph_gif inet | netgraph_gif inet6 net/if_gre.c optional gre inet | gre inet6 net/if_ipsec.c optional inet ipsec | inet6 ipsec net/if_lagg.c optional lagg net/if_loop.c optional loop net/if_llatbl.c standard net/if_me.c optional me inet net/if_media.c standard net/if_mib.c standard net/if_spppfr.c optional sppp | netgraph_sppp net/if_spppsubr.c optional sppp | netgraph_sppp net/if_stf.c optional stf inet inet6 net/if_tuntap.c optional tuntap net/if_vlan.c optional vlan net/if_vxlan.c optional vxlan inet | vxlan inet6 net/ifdi_if.m optional ether pci iflib net/iflib.c optional ether pci iflib net/iflib_clone.c optional ether pci iflib net/mp_ring.c optional ether iflib net/mppcc.c optional netgraph_mppc_compression net/mppcd.c optional netgraph_mppc_compression net/netisr.c standard net/pfil.c optional ether | inet net/radix.c standard net/radix_mpath.c standard net/raw_cb.c standard net/raw_usrreq.c standard net/route.c standard net/rss_config.c optional inet rss | inet6 rss net/rtsock.c standard net/slcompress.c optional netgraph_vjc | sppp | \ netgraph_sppp net/toeplitz.c optional inet rss | inet6 rss net/vnet.c optional vimage net80211/ieee80211.c optional wlan net80211/ieee80211_acl.c optional wlan wlan_acl net80211/ieee80211_action.c optional wlan net80211/ieee80211_adhoc.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ageq.c optional wlan net80211/ieee80211_amrr.c optional wlan | wlan_amrr net80211/ieee80211_crypto.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_crypto_ccmp.c optional wlan wlan_ccmp net80211/ieee80211_crypto_none.c optional wlan net80211/ieee80211_crypto_tkip.c optional wlan wlan_tkip net80211/ieee80211_crypto_wep.c optional wlan wlan_wep net80211/ieee80211_ddb.c optional wlan ddb net80211/ieee80211_dfs.c optional wlan net80211/ieee80211_freebsd.c optional wlan net80211/ieee80211_hostap.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_ht.c optional wlan net80211/ieee80211_hwmp.c optional wlan ieee80211_support_mesh net80211/ieee80211_input.c optional wlan net80211/ieee80211_ioctl.c optional wlan net80211/ieee80211_mesh.c optional wlan ieee80211_support_mesh \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_monitor.c optional wlan net80211/ieee80211_node.c optional wlan net80211/ieee80211_output.c optional wlan net80211/ieee80211_phy.c optional wlan net80211/ieee80211_power.c optional wlan net80211/ieee80211_proto.c optional wlan net80211/ieee80211_radiotap.c optional wlan net80211/ieee80211_ratectl.c optional wlan net80211/ieee80211_ratectl_none.c optional wlan net80211/ieee80211_regdomain.c optional wlan net80211/ieee80211_rssadapt.c optional wlan wlan_rssadapt net80211/ieee80211_scan.c optional wlan net80211/ieee80211_scan_sta.c optional wlan net80211/ieee80211_sta.c optional wlan \ compile-with "${NORMAL_C} -Wno-unused-function" net80211/ieee80211_superg.c optional wlan ieee80211_support_superg net80211/ieee80211_scan_sw.c optional wlan net80211/ieee80211_tdma.c optional wlan ieee80211_support_tdma net80211/ieee80211_vht.c optional wlan net80211/ieee80211_wds.c optional wlan net80211/ieee80211_xauth.c optional wlan wlan_xauth net80211/ieee80211_alq.c optional wlan ieee80211_alq netgraph/atm/ccatm/ng_ccatm.c optional ngatm_ccatm \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/ngatmbase.c optional ngatm_atmbase \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscfu/ng_sscfu.c optional ngatm_sscfu \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/sscop/ng_sscop.c optional ngatm_sscop \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/atm/uni/ng_uni.c optional ngatm_uni \ compile-with "${NORMAL_C} -I$S/contrib/ngatm" netgraph/bluetooth/common/ng_bluetooth.c optional netgraph_bluetooth netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c optional netgraph_bluetooth_bt3c netgraph/bluetooth/drivers/h4/ng_h4.c optional netgraph_bluetooth_h4 netgraph/bluetooth/drivers/ubt/ng_ubt.c optional netgraph_bluetooth_ubt usb netgraph/bluetooth/drivers/ubt/ng_ubt_intel.c optional netgraph_bluetooth_ubt usb netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c optional netgraph_bluetooth_ubtbcmfw usb netgraph/bluetooth/hci/ng_hci_cmds.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_evnt.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_main.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_misc.c optional netgraph_bluetooth_hci netgraph/bluetooth/hci/ng_hci_ulpi.c optional netgraph_bluetooth_hci netgraph/bluetooth/l2cap/ng_l2cap_cmds.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_evnt.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_llpi.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_main.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_misc.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c optional netgraph_bluetooth_l2cap netgraph/bluetooth/socket/ng_btsocket.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_hci_raw.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_l2cap.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_rfcomm.c optional netgraph_bluetooth_socket netgraph/bluetooth/socket/ng_btsocket_sco.c optional netgraph_bluetooth_socket netgraph/netflow/netflow.c optional netgraph_netflow netgraph/netflow/netflow_v9.c optional netgraph_netflow netgraph/netflow/ng_netflow.c optional netgraph_netflow netgraph/ng_UI.c optional netgraph_UI netgraph/ng_async.c optional netgraph_async netgraph/ng_atmllc.c optional netgraph_atmllc netgraph/ng_base.c optional netgraph netgraph/ng_bpf.c optional netgraph_bpf netgraph/ng_bridge.c optional netgraph_bridge netgraph/ng_car.c optional netgraph_car netgraph/ng_checksum.c optional netgraph_checksum netgraph/ng_cisco.c optional netgraph_cisco netgraph/ng_deflate.c optional netgraph_deflate netgraph/ng_device.c optional netgraph_device netgraph/ng_echo.c optional netgraph_echo netgraph/ng_eiface.c optional netgraph_eiface netgraph/ng_ether.c optional netgraph_ether netgraph/ng_ether_echo.c optional netgraph_ether_echo netgraph/ng_frame_relay.c optional netgraph_frame_relay netgraph/ng_gif.c optional netgraph_gif inet6 | netgraph_gif inet netgraph/ng_gif_demux.c optional netgraph_gif_demux netgraph/ng_hole.c optional netgraph_hole netgraph/ng_iface.c optional netgraph_iface netgraph/ng_ip_input.c optional netgraph_ip_input netgraph/ng_ipfw.c optional netgraph_ipfw inet ipfirewall netgraph/ng_ksocket.c optional netgraph_ksocket netgraph/ng_l2tp.c optional netgraph_l2tp netgraph/ng_lmi.c optional netgraph_lmi netgraph/ng_mppc.c optional netgraph_mppc_compression | \ netgraph_mppc_encryption netgraph/ng_nat.c optional netgraph_nat inet libalias netgraph/ng_one2many.c optional netgraph_one2many netgraph/ng_parse.c optional netgraph netgraph/ng_patch.c optional netgraph_patch netgraph/ng_pipe.c optional netgraph_pipe netgraph/ng_ppp.c optional netgraph_ppp netgraph/ng_pppoe.c optional netgraph_pppoe netgraph/ng_pptpgre.c optional netgraph_pptpgre netgraph/ng_pred1.c optional netgraph_pred1 netgraph/ng_rfc1490.c optional netgraph_rfc1490 netgraph/ng_socket.c optional netgraph_socket netgraph/ng_split.c optional netgraph_split netgraph/ng_sppp.c optional netgraph_sppp netgraph/ng_tag.c optional netgraph_tag netgraph/ng_tcpmss.c optional netgraph_tcpmss netgraph/ng_tee.c optional netgraph_tee netgraph/ng_tty.c optional netgraph_tty netgraph/ng_vjc.c optional netgraph_vjc netgraph/ng_vlan.c optional netgraph_vlan netinet/accf_data.c optional accept_filter_data inet netinet/accf_dns.c optional accept_filter_dns inet netinet/accf_http.c optional accept_filter_http inet netinet/if_ether.c optional inet ether netinet/igmp.c optional inet netinet/in.c optional inet netinet/in_debug.c optional inet ddb netinet/in_kdtrace.c optional inet | inet6 netinet/ip_carp.c optional inet carp | inet6 carp netinet/in_fib.c optional inet netinet/in_gif.c optional gif inet | netgraph_gif inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_jail.c optional inet netinet/in_mcast.c optional inet netinet/in_pcb.c optional inet | inet6 netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup netinet/in_prot.c optional inet | inet6 netinet/in_proto.c optional inet | inet6 netinet/in_rmx.c optional inet netinet/in_rss.c optional inet rss netinet/ip_divert.c optional inet ipdivert ipfirewall netinet/ip_ecn.c optional inet | inet6 netinet/ip_encap.c optional inet | inet6 netinet/ip_fastfwd.c optional inet netinet/ip_icmp.c optional inet | inet6 netinet/ip_input.c optional inet netinet/ip_mroute.c optional mrouting inet netinet/ip_options.c optional inet netinet/ip_output.c optional inet netinet/ip_reass.c optional inet netinet/raw_ip.c optional inet | inet6 netinet/cc/cc.c optional inet | inet6 netinet/cc/cc_newreno.c optional inet | inet6 netinet/sctp_asconf.c optional inet sctp | inet6 sctp netinet/sctp_auth.c optional inet sctp | inet6 sctp netinet/sctp_bsd_addr.c optional inet sctp | inet6 sctp netinet/sctp_cc_functions.c optional inet sctp | inet6 sctp netinet/sctp_crc32.c optional inet | inet6 netinet/sctp_indata.c optional inet sctp | inet6 sctp netinet/sctp_input.c optional inet sctp | inet6 sctp netinet/sctp_output.c optional inet sctp | inet6 sctp netinet/sctp_pcb.c optional inet sctp | inet6 sctp netinet/sctp_peeloff.c optional inet sctp | inet6 sctp netinet/sctp_ss_functions.c optional inet sctp | inet6 sctp netinet/sctp_syscalls.c optional inet sctp | inet6 sctp netinet/sctp_sysctl.c optional inet sctp | inet6 sctp netinet/sctp_timer.c optional inet sctp | inet6 sctp netinet/sctp_usrreq.c optional inet sctp | inet6 sctp netinet/sctputil.c optional inet sctp | inet6 sctp netinet/siftr.c optional inet siftr alq | inet6 siftr alq netinet/tcp_debug.c optional tcpdebug netinet/tcp_fastopen.c optional inet tcp_rfc7413 | inet6 tcp_rfc7413 netinet/tcp_hostcache.c optional inet | inet6 netinet/tcp_input.c optional inet | inet6 netinet/tcp_log_buf.c optional tcp_blackbox inet | tcp_blackbox inet6 netinet/tcp_lro.c optional inet | inet6 netinet/tcp_output.c optional inet | inet6 netinet/tcp_offload.c optional tcp_offload inet | tcp_offload inet6 netinet/tcp_hpts.c optional tcphpts inet | tcphpts inet6 netinet/tcp_ratelimit.c optional ratelimit inet | ratelimit inet6 netinet/tcp_pcap.c optional inet tcppcap | inet6 tcppcap \ compile-with "${NORMAL_C} ${NO_WNONNULL}" netinet/tcp_reass.c optional inet | inet6 netinet/tcp_sack.c optional inet | inet6 netinet/tcp_subr.c optional inet | inet6 netinet/tcp_syncache.c optional inet | inet6 netinet/tcp_timer.c optional inet | inet6 netinet/tcp_timewait.c optional inet | inet6 netinet/tcp_usrreq.c optional inet | inet6 netinet/udp_usrreq.c optional inet | inet6 netinet/libalias/alias.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_db.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_mod.c optional libalias | netgraph_nat netinet/libalias/alias_proxy.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_util.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_sctp.c optional libalias inet | netgraph_nat inet netinet/netdump/netdump_client.c optional inet netdump netinet6/dest6.c optional inet6 netinet6/frag6.c optional inet6 netinet6/icmp6.c optional inet6 netinet6/in6.c optional inet6 netinet6/in6_cksum.c optional inet6 netinet6/in6_fib.c optional inet6 netinet6/in6_gif.c optional gif inet6 | netgraph_gif inet6 netinet6/in6_ifattach.c optional inet6 netinet6/in6_jail.c optional inet6 netinet6/in6_mcast.c optional inet6 netinet6/in6_pcb.c optional inet6 netinet6/in6_pcbgroup.c optional inet6 pcbgroup netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 netinet6/in6_rss.c optional inet6 rss netinet6/in6_src.c optional inet6 netinet6/ip6_fastfwd.c optional inet6 netinet6/ip6_forward.c optional inet6 netinet6/ip6_gre.c optional gre inet6 netinet6/ip6_id.c optional inet6 netinet6/ip6_input.c optional inet6 netinet6/ip6_mroute.c optional mrouting inet6 netinet6/ip6_output.c optional inet6 netinet6/mld6.c optional inet6 netinet6/nd6.c optional inet6 netinet6/nd6_nbr.c optional inet6 netinet6/nd6_rtr.c optional inet6 netinet6/raw_ip6.c optional inet6 netinet6/route6.c optional inet6 netinet6/scope6.c optional inet6 netinet6/sctp6_usrreq.c optional inet6 sctp netinet6/udp6_usrreq.c optional inet6 netipsec/ipsec.c optional ipsec inet | ipsec inet6 netipsec/ipsec_input.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mbuf.c optional ipsec inet | ipsec inet6 netipsec/ipsec_mod.c optional ipsec inet | ipsec inet6 netipsec/ipsec_output.c optional ipsec inet | ipsec inet6 netipsec/ipsec_pcb.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/key.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/key_debug.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/keysock.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/subr_ipsec.c optional ipsec inet | ipsec inet6 | \ ipsec_support inet | ipsec_support inet6 netipsec/udpencap.c optional ipsec inet netipsec/xform_ah.c optional ipsec inet | ipsec inet6 netipsec/xform_esp.c optional ipsec inet | ipsec inet6 netipsec/xform_ipcomp.c optional ipsec inet | ipsec inet6 netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ ipsec inet6 tcp_signature | ipsec_support inet tcp_signature | \ ipsec_support inet6 tcp_signature netpfil/ipfw/dn_aqm_codel.c optional inet dummynet netpfil/ipfw/dn_aqm_pie.c optional inet dummynet netpfil/ipfw/dn_heap.c optional inet dummynet netpfil/ipfw/dn_sched_fifo.c optional inet dummynet netpfil/ipfw/dn_sched_fq_codel.c optional inet dummynet netpfil/ipfw/dn_sched_fq_pie.c optional inet dummynet netpfil/ipfw/dn_sched_prio.c optional inet dummynet netpfil/ipfw/dn_sched_qfq.c optional inet dummynet netpfil/ipfw/dn_sched_rr.c optional inet dummynet netpfil/ipfw/dn_sched_wf2q.c optional inet dummynet netpfil/ipfw/ip_dummynet.c optional inet dummynet netpfil/ipfw/ip_dn_io.c optional inet dummynet netpfil/ipfw/ip_dn_glue.c optional inet dummynet netpfil/ipfw/ip_fw2.c optional inet ipfirewall netpfil/ipfw/ip_fw_bpf.c optional inet ipfirewall netpfil/ipfw/ip_fw_dynamic.c optional inet ipfirewall \ compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/ip_fw_eaction.c optional inet ipfirewall netpfil/ipfw/ip_fw_log.c optional inet ipfirewall netpfil/ipfw/ip_fw_pfil.c optional inet ipfirewall netpfil/ipfw/ip_fw_sockopt.c optional inet ipfirewall netpfil/ipfw/ip_fw_table.c optional inet ipfirewall netpfil/ipfw/ip_fw_table_algo.c optional inet ipfirewall netpfil/ipfw/ip_fw_table_value.c optional inet ipfirewall netpfil/ipfw/ip_fw_iface.c optional inet ipfirewall netpfil/ipfw/ip_fw_nat.c optional inet ipfirewall_nat netpfil/ipfw/nat64/ip_fw_nat64.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64clat.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64clat_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64lsn.c optional inet inet6 ipfirewall \ ipfirewall_nat64 compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/nat64/nat64lsn_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 compile-with "${NORMAL_C} -I$S/contrib/ck/include" netpfil/ipfw/nat64/nat64stl.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64stl_control.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nat64/nat64_translate.c optional inet inet6 ipfirewall \ ipfirewall_nat64 netpfil/ipfw/nptv6/ip_fw_nptv6.c optional inet inet6 ipfirewall \ ipfirewall_nptv6 netpfil/ipfw/nptv6/nptv6.c optional inet inet6 ipfirewall \ ipfirewall_nptv6 netpfil/ipfw/pmod/ip_fw_pmod.c optional inet ipfirewall_pmod netpfil/ipfw/pmod/tcpmod.c optional inet ipfirewall_pmod netpfil/pf/if_pflog.c optional pflog pf inet netpfil/pf/if_pfsync.c optional pfsync pf inet netpfil/pf/pf.c optional pf inet netpfil/pf/pf_if.c optional pf inet netpfil/pf/pf_ioctl.c optional pf inet netpfil/pf/pf_lb.c optional pf inet netpfil/pf/pf_norm.c optional pf inet netpfil/pf/pf_osfp.c optional pf inet netpfil/pf/pf_ruleset.c optional pf inet netpfil/pf/pf_table.c optional pf inet netpfil/pf/in4_cksum.c optional pf inet netsmb/smb_conn.c optional netsmb netsmb/smb_crypt.c optional netsmb netsmb/smb_dev.c optional netsmb netsmb/smb_iod.c optional netsmb netsmb/smb_rq.c optional netsmb netsmb/smb_smb.c optional netsmb netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb nfs/bootp_subr.c optional bootp nfscl nfs/krpc_subr.c optional bootp nfscl nfs/nfs_diskless.c optional nfscl nfs_root nfs/nfs_fha.c optional nfsd nfs/nfs_lock.c optional nfscl | nfslockd | nfsd nfs/nfs_nfssvc.c optional nfscl | nfsd nlm/nlm_advlock.c optional nfslockd | nfsd nlm/nlm_prot_clnt.c optional nfslockd | nfsd nlm/nlm_prot_impl.c optional nfslockd | nfsd nlm/nlm_prot_server.c optional nfslockd | nfsd nlm/nlm_prot_svc.c optional nfslockd | nfsd nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd # Linux Kernel Programming Interface compat/linuxkpi/common/src/linux_kmod.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_compat.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_current.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_hrtimer.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kthread.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_lock.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_page.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_tasklet.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_radix.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_rcu.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C} -I$S/contrib/ck/include" compat/linuxkpi/common/src/linux_schedule.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_slab.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_work.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_seq_file.c optional compat_linuxkpi | lindebugfs \ compile-with "${LINUXKPI_C}" compat/lindebugfs/lindebugfs.c optional lindebugfs \ compile-with "${LINUXKPI_C}" # OpenFabrics Enterprise Distribution (Infiniband) ofed/drivers/infiniband/core/ib_addr.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_agent.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cache.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cm.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cma.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_cq.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_device.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_fmr_pool.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_iwcm.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_iwpm_msg.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_iwpm_util.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_mad.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_mad_rmpp.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_multicast.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_packer.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_roce_gid_mgmt.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_sa_query.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_smi.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_sysfs.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_ucm.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_ucma.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_ud_header.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_umem.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_user_mad.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_uverbs_cmd.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_uverbs_main.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_uverbs_marshall.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/core/ib_verbs.c optional ofed \ compile-with "${OFED_C}" ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_fs.c optional ipoib \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_ib.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_multicast.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/ipoib/ipoib_verbs.c optional ipoib \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" #ofed/drivers/infiniband/ulp/ipoib/ipoib_vlan.c optional ipoib \ # compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/ipoib/" ofed/drivers/infiniband/ulp/sdp/sdp_bcopy.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_main.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_rx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_cma.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" ofed/drivers/infiniband/ulp/sdp/sdp_tx.c optional sdp inet \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/ulp/sdp/" dev/mthca/mthca_allocator.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_av.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_catas.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_cmd.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_cq.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_eq.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_mad.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_main.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_mcg.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_memfree.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_mr.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_pd.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_profile.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_provider.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_qp.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_reset.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_srq.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mthca/mthca_uar.c optional mthca pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_alias_GUID.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mcg.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_sysfs.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_cm.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_ah.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_cq.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_doorbell.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mad.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_main.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_mr.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_qp.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_srq.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_ib/mlx4_ib_wc.c optional mlx4ib pci ofed \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_alloc.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_catas.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_cmd.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_cq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_eq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_fw.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_fw_qos.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_icm.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_intf.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_main.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_mcg.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_mr.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_pd.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_port.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_profile.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_qp.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_reset.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_sense.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_srq.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_core/mlx4_resource_tracker.c optional mlx4 pci \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_cq.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_main.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_netdev.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_port.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_resources.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_rx.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx4/mlx4_en/mlx4_en_tx.c optional mlx4en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_ah.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_cong.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_cq.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_doorbell.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_gsi.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_mad.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_main.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_mem.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_mr.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_qp.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_srq.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_ib/mlx5_ib_virt.c optional mlx5ib pci ofed \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_alloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_cq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_diagnostics.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_eq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_cmd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fs_tree.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fw.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_fwdump.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_health.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mad.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_main.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mcg.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mpfs.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_mr.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pagealloc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_pd.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_port.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_qp.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_rl.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_srq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_transobj.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_uar.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vport.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_vsc.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_core/mlx5_wq.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_lib/mlx5_gid.c optional mlx5 pci \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_dim.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_ethtool.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_main.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_tx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_flow_table.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_rl.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_txrx.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" dev/mlx5/mlx5_en/mlx5_en_port_buffer.c optional mlx5en pci inet inet6 \ compile-with "${OFED_C}" # crypto support opencrypto/cast.c optional crypto | ipsec | ipsec_support opencrypto/criov.c optional crypto | ipsec | ipsec_support opencrypto/crypto.c optional crypto | ipsec | ipsec_support opencrypto/cryptodev.c optional cryptodev opencrypto/cryptodev_if.m optional crypto | ipsec | ipsec_support opencrypto/cryptosoft.c optional crypto | ipsec | ipsec_support opencrypto/cryptodeflate.c optional crypto | ipsec | ipsec_support opencrypto/gmac.c optional crypto | ipsec | ipsec_support opencrypto/gfmult.c optional crypto | ipsec | ipsec_support opencrypto/rmd160.c optional crypto | ipsec | ipsec_support opencrypto/skipjack.c optional crypto | ipsec | ipsec_support opencrypto/xform.c optional crypto | ipsec | ipsec_support opencrypto/xform_poly1305.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" contrib/libsodium/src/libsodium/crypto_verify/sodium/verify.c \ optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include/sodium -I$S/crypto/libsodium" crypto/libsodium/randombytes.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" crypto/libsodium/utils.c optional crypto \ compile-with "${NORMAL_C} -I$S/contrib/libsodium/src/libsodium/include -I$S/crypto/libsodium" opencrypto/cbc_mac.c optional crypto opencrypto/xform_cbc_mac.c optional crypto rpc/auth_none.c optional krpc | nfslockd | nfscl | nfsd rpc/auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/authunix_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_bck.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_dg.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_rc.c optional krpc | nfslockd | nfscl | nfsd rpc/clnt_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/getnetconfig.c optional krpc | nfslockd | nfscl | nfsd rpc/replay.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_callmsg.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_generic.c optional krpc | nfslockd | nfscl | nfsd rpc/rpc_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcb_clnt.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcb_prot.c optional krpc | nfslockd | nfscl | nfsd rpc/svc.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_auth.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_auth_unix.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_dg.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_generic.c optional krpc | nfslockd | nfscl | nfsd rpc/svc_vc.c optional krpc | nfslockd | nfscl | nfsd rpc/rpcsec_gss/rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_conf.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_misc.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/rpcsec_gss_prot.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi rpc/rpcsec_gss/svc_rpcsec_gss.c optional krpc kgssapi | nfslockd kgssapi | nfscl kgssapi | nfsd kgssapi security/audit/audit.c optional audit security/audit/audit_arg.c optional audit security/audit/audit_bsm.c optional audit security/audit/audit_bsm_db.c optional audit security/audit/audit_bsm_klib.c optional audit security/audit/audit_dtrace.c optional dtaudit audit | dtraceall audit compile-with "${CDDL_C}" security/audit/audit_pipe.c optional audit security/audit/audit_syscalls.c standard security/audit/audit_trigger.c optional audit security/audit/audit_worker.c optional audit security/audit/bsm_domain.c optional audit security/audit/bsm_errno.c optional audit security/audit/bsm_fcntl.c optional audit security/audit/bsm_socket_type.c optional audit security/audit/bsm_token.c optional audit security/mac/mac_audit.c optional mac audit security/mac/mac_cred.c optional mac security/mac/mac_framework.c optional mac security/mac/mac_inet.c optional mac inet | mac inet6 security/mac/mac_inet6.c optional mac inet6 security/mac/mac_label.c optional mac security/mac/mac_net.c optional mac security/mac/mac_pipe.c optional mac security/mac/mac_posix_sem.c optional mac security/mac/mac_posix_shm.c optional mac security/mac/mac_priv.c optional mac security/mac/mac_process.c optional mac security/mac/mac_socket.c optional mac security/mac/mac_syscalls.c standard security/mac/mac_system.c optional mac security/mac/mac_sysv_msg.c optional mac security/mac/mac_sysv_sem.c optional mac security/mac/mac_sysv_shm.c optional mac security/mac/mac_vfs.c optional mac security/mac_biba/mac_biba.c optional mac_biba security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended security/mac_ifoff/mac_ifoff.c optional mac_ifoff security/mac_lomac/mac_lomac.c optional mac_lomac security/mac_mls/mac_mls.c optional mac_mls security/mac_none/mac_none.c optional mac_none security/mac_ntpd/mac_ntpd.c optional mac_ntpd security/mac_partition/mac_partition.c optional mac_partition security/mac_portacl/mac_portacl.c optional mac_portacl security/mac_seeotheruids/mac_seeotheruids.c optional mac_seeotheruids security/mac_stub/mac_stub.c optional mac_stub security/mac_test/mac_test.c optional mac_test security/mac_veriexec/mac_veriexec.c optional mac_veriexec security/mac_veriexec/veriexec_fingerprint.c optional mac_veriexec security/mac_veriexec/veriexec_metadata.c optional mac_veriexec security/mac_veriexec_parser/mac_veriexec_parser.c optional mac_veriexec mac_veriexec_parser security/mac_veriexec/mac_veriexec_rmd160.c optional mac_veriexec_rmd160 security/mac_veriexec/mac_veriexec_sha1.c optional mac_veriexec_sha1 security/mac_veriexec/mac_veriexec_sha256.c optional mac_veriexec_sha256 security/mac_veriexec/mac_veriexec_sha384.c optional mac_veriexec_sha384 security/mac_veriexec/mac_veriexec_sha512.c optional mac_veriexec_sha512 teken/teken.c optional sc !SC_NO_TERM_TEKEN | vt ufs/ffs/ffs_alloc.c optional ffs ufs/ffs/ffs_balloc.c optional ffs ufs/ffs/ffs_inode.c optional ffs ufs/ffs/ffs_snapshot.c optional ffs ufs/ffs/ffs_softdep.c optional ffs ufs/ffs/ffs_subr.c optional ffs | geom_label ufs/ffs/ffs_tables.c optional ffs | geom_label ufs/ffs/ffs_vfsops.c optional ffs ufs/ffs/ffs_vnops.c optional ffs ufs/ffs/ffs_rawread.c optional ffs directio ufs/ffs/ffs_suspend.c optional ffs ufs/ufs/ufs_acl.c optional ffs ufs/ufs/ufs_bmap.c optional ffs ufs/ufs/ufs_dirhash.c optional ffs ufs/ufs/ufs_extattr.c optional ffs ufs/ufs/ufs_gjournal.c optional ffs UFS_GJOURNAL ufs/ufs/ufs_inode.c optional ffs ufs/ufs/ufs_lookup.c optional ffs ufs/ufs/ufs_quota.c optional ffs ufs/ufs/ufs_vfsops.c optional ffs ufs/ufs/ufs_vnops.c optional ffs vm/default_pager.c standard vm/device_pager.c standard vm/phys_pager.c standard vm/redzone.c optional DEBUG_REDZONE vm/sg_pager.c standard vm/swap_pager.c standard vm/uma_core.c standard vm/uma_dbg.c standard vm/memguard.c optional DEBUG_MEMGUARD vm/vm_domainset.c standard vm/vm_fault.c standard vm/vm_glue.c standard vm/vm_init.c standard vm/vm_kern.c standard vm/vm_map.c standard vm/vm_meter.c standard vm/vm_mmap.c standard vm/vm_object.c standard vm/vm_page.c standard vm/vm_pageout.c standard vm/vm_pager.c standard vm/vm_phys.c standard vm/vm_radix.c standard vm/vm_reserv.c standard vm/vm_swapout.c optional !NO_SWAPPING vm/vm_swapout_dummy.c optional NO_SWAPPING vm/vm_unix.c standard vm/vnode_pager.c standard xen/features.c optional xenhvm xen/xenbus/xenbus_if.m optional xenhvm xen/xenbus/xenbus.c optional xenhvm xen/xenbus/xenbusb_if.m optional xenhvm xen/xenbus/xenbusb.c optional xenhvm xen/xenbus/xenbusb_front.c optional xenhvm xen/xenbus/xenbusb_back.c optional xenhvm xen/xenmem/xenmem_if.m optional xenhvm xdr/xdr.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_array.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mbuf.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_mem.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_reference.c optional krpc | nfslockd | nfscl | nfsd xdr/xdr_sizeof.c optional krpc | nfslockd | nfscl | nfsd Index: head/sys/conf/options =================================================================== --- head/sys/conf/options (revision 353282) +++ head/sys/conf/options (revision 353283) @@ -1,1030 +1,1031 @@ # $FreeBSD$ # # On the handling of kernel options # # All kernel options should be listed in NOTES, with suitable # descriptions. Negative options (options that make some code not # compile) should be commented out; LINT (generated from NOTES) should # compile as much code as possible. Try to structure option-using # code so that a single option only switch code on, or only switch # code off, to make it possible to have a full compile-test. If # necessary, you can check for COMPILING_LINT to get maximum code # coverage. # # All new options shall also be listed in either "conf/options" or # "conf/options.". Options that affect a single source-file # .[c|s] should be directed into "opt_.h", while options # that affect multiple files should either go in "opt_global.h" if # this is a kernel-wide option (used just about everywhere), or in # "opt_.h" if it affects only some files. # Note that the effect of listing only an option without a # header-file-name in conf/options (and cousins) is that the last # convention is followed. # # This handling scheme is not yet fully implemented. # # # Format of this file: # Option name filename # # If filename is missing, the default is # opt_.h AAC_DEBUG opt_aac.h AACRAID_DEBUG opt_aacraid.h AHC_ALLOW_MEMIO opt_aic7xxx.h AHC_TMODE_ENABLE opt_aic7xxx.h AHC_DUMP_EEPROM opt_aic7xxx.h AHC_DEBUG opt_aic7xxx.h AHC_DEBUG_OPTS opt_aic7xxx.h AHC_REG_PRETTY_PRINT opt_aic7xxx.h AHD_DEBUG opt_aic79xx.h AHD_DEBUG_OPTS opt_aic79xx.h AHD_TMODE_ENABLE opt_aic79xx.h AHD_REG_PRETTY_PRINT opt_aic79xx.h TWA_DEBUG opt_twa.h # Debugging options. ALT_BREAK_TO_DEBUGGER opt_kdb.h BREAK_TO_DEBUGGER opt_kdb.h BUF_TRACKING opt_global.h DDB DDB_BUFR_SIZE opt_ddb.h DDB_CAPTURE_DEFAULTBUFSIZE opt_ddb.h DDB_CAPTURE_MAXBUFSIZE opt_ddb.h DDB_CTF opt_ddb.h DDB_NUMSYM opt_ddb.h FULL_BUF_TRACKING opt_global.h GDB KDB opt_global.h KDB_TRACE opt_kdb.h KDB_UNATTENDED opt_kdb.h KLD_DEBUG opt_kld.h SYSCTL_DEBUG opt_sysctl.h EARLY_PRINTF opt_global.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h NUM_CORE_FILES opt_global.h TSLOG opt_global.h TSLOGSIZE opt_global.h # Miscellaneous options. ALQ ALTERA_SDCARD_FAST_SIM opt_altera_sdcard.h ATSE_CFI_HACK opt_cfi.h AUDIT opt_global.h BOOTHOWTO opt_global.h BOOTVERBOSE opt_global.h CALLOUT_PROFILING CAPABILITIES opt_capsicum.h CAPABILITY_MODE opt_capsicum.h COMPAT_43 opt_global.h COMPAT_43TTY opt_global.h COMPAT_FREEBSD4 opt_global.h COMPAT_FREEBSD5 opt_global.h COMPAT_FREEBSD6 opt_global.h COMPAT_FREEBSD7 opt_global.h COMPAT_FREEBSD9 opt_global.h COMPAT_FREEBSD10 opt_global.h COMPAT_FREEBSD11 opt_global.h COMPAT_FREEBSD12 opt_global.h COMPAT_CLOUDABI32 opt_dontuse.h COMPAT_CLOUDABI64 opt_dontuse.h COMPAT_LINUXKPI opt_dontuse.h _COMPAT_LINUX32 opt_compat.h # XXX: make sure opt_compat.h exists COMPILING_LINT opt_global.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h EXPERIMENTAL opt_global.h EXT_RESOURCES opt_global.h DIRECTIO FILEMON opt_dontuse.h FFCLOCK FULL_PREEMPTION opt_sched.h GZIO opt_gzio.h IMAGACT_BINMISC opt_dontuse.h IPI_PREEMPTION opt_sched.h GEOM_BDE opt_geom.h GEOM_CACHE opt_geom.h GEOM_CONCAT opt_geom.h GEOM_ELI opt_geom.h GEOM_GATE opt_geom.h GEOM_JOURNAL opt_geom.h GEOM_LABEL opt_geom.h GEOM_LABEL_GPT opt_geom.h GEOM_LINUX_LVM opt_geom.h GEOM_MAP opt_geom.h GEOM_MIRROR opt_geom.h GEOM_MOUNTVER opt_geom.h GEOM_MULTIPATH opt_geom.h GEOM_NOP opt_geom.h GEOM_PART_APM opt_geom.h GEOM_PART_BSD opt_geom.h GEOM_PART_BSD64 opt_geom.h GEOM_PART_EBR opt_geom.h GEOM_PART_EBR_COMPAT opt_geom.h GEOM_PART_GPT opt_geom.h GEOM_PART_LDM opt_geom.h GEOM_PART_MBR opt_geom.h GEOM_PART_VTOC8 opt_geom.h GEOM_RAID opt_geom.h GEOM_RAID3 opt_geom.h GEOM_SHSEC opt_geom.h GEOM_STRIPE opt_geom.h GEOM_UZIP opt_geom.h GEOM_UZIP_DEBUG opt_geom.h GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_ZERO opt_geom.h IFLIB opt_iflib.h KDTRACE_HOOKS opt_global.h KDTRACE_FRAME opt_kdtrace.h KN_HASHSIZE opt_kqueue.h KSTACK_MAX_PAGES KSTACK_PAGES KSTACK_USAGE_PROF KTRACE KTRACE_REQUEST_POOL opt_ktrace.h LIBICONV MAC opt_global.h MAC_BIBA opt_dontuse.h MAC_BSDEXTENDED opt_dontuse.h MAC_IFOFF opt_dontuse.h MAC_LOMAC opt_dontuse.h MAC_MLS opt_dontuse.h MAC_NONE opt_dontuse.h MAC_NTPD opt_dontuse.h MAC_PARTITION opt_dontuse.h MAC_PORTACL opt_dontuse.h MAC_SEEOTHERUIDS opt_dontuse.h MAC_STATIC opt_mac.h MAC_STUB opt_dontuse.h MAC_TEST opt_dontuse.h MAC_VERIEXEC opt_dontuse.h MAC_VERIEXEC_SHA1 opt_dontuse.h MAC_VERIEXEC_SHA256 opt_dontuse.h MAC_VERIEXEC_SHA384 opt_dontuse.h MAC_VERIEXEC_SHA512 opt_dontuse.h MD_ROOT opt_md.h MD_ROOT_FSTYPE opt_md.h MD_ROOT_READONLY opt_md.h MD_ROOT_SIZE opt_md.h MD_ROOT_MEM opt_md.h MFI_DEBUG opt_mfi.h MFI_DECODE_LOG opt_mfi.h MPROF_BUFFERS opt_mprof.h MPROF_HASH_SIZE opt_mprof.h NEW_PCIB opt_global.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX NO_EVENTTIMERS opt_timer.h NO_OBSOLETE_CODE opt_global.h NO_SYSCTL_DESCR opt_global.h NSWBUF_MIN opt_param.h MBUF_PACKET_ZONE_DISABLE opt_global.h PANIC_REBOOT_WAIT_TIME opt_panic.h PCI_HP opt_pci.h PCI_IOV opt_global.h PPC_DEBUG opt_ppc.h PPC_PROBE_CHIPSET opt_ppc.h PPS_SYNC opt_ntp.h PREEMPTION opt_sched.h QUOTA SCHED_4BSD opt_sched.h SCHED_STATS opt_sched.h SCHED_ULE opt_sched.h SLEEPQUEUE_PROFILING SLHCI_DEBUG opt_slhci.h STACK opt_stack.h SUIDDIR MSGMNB opt_sysvipc.h MSGMNI opt_sysvipc.h MSGSEG opt_sysvipc.h MSGSSZ opt_sysvipc.h MSGTQL opt_sysvipc.h SEMMNI opt_sysvipc.h SEMMNS opt_sysvipc.h SEMMNU opt_sysvipc.h SEMMSL opt_sysvipc.h SEMOPM opt_sysvipc.h SEMUME opt_sysvipc.h SHMALL opt_sysvipc.h SHMMAX opt_sysvipc.h SHMMAXPGS opt_sysvipc.h SHMMIN opt_sysvipc.h SHMMNI opt_sysvipc.h SHMSEG opt_sysvipc.h SYSVMSG opt_sysvipc.h SYSVSEM opt_sysvipc.h SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TCPHPTS opt_inet.h TURNSTILE_PROFILING UMTX_PROFILING UMTX_CHAINS opt_global.h VERBOSE_SYSINIT ZSTDIO opt_zstdio.h # Sanitizers COVERAGE opt_global.h KCOV KUBSAN opt_global.h # POSIX kernel options P1003_1B_MQUEUE opt_posix.h P1003_1B_SEMAPHORES opt_posix.h _KPOSIX_PRIORITY_SCHEDULING opt_posix.h # Do we want the config file compiled into the kernel? INCLUDE_CONFIG_FILE opt_config.h # Options for static filesystems. These should only be used at config # time, since the corresponding lkms cannot work if there are any static # dependencies. Unusability is enforced by hiding the defines for the # options in a never-included header. AUTOFS opt_dontuse.h CD9660 opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h FFS opt_dontuse.h FUSEFS opt_dontuse.h MSDOSFS opt_dontuse.h NULLFS opt_dontuse.h PROCFS opt_dontuse.h PSEUDOFS opt_dontuse.h SMBFS opt_dontuse.h TMPFS opt_dontuse.h UDF opt_dontuse.h UNIONFS opt_dontuse.h ZFS opt_dontuse.h # Pseudofs debugging PSEUDOFS_TRACE opt_pseudofs.h # In-kernel GSS-API KGSSAPI opt_kgssapi.h KGSSAPI_DEBUG opt_kgssapi.h # These static filesystems have one slightly bogus static dependency in # sys/i386/i386/autoconf.c. If any of these filesystems are # statically compiled into the kernel, code for mounting them as root # filesystems will be enabled - but look below. # NFSCL - client # NFSD - server NFSCL opt_nfs.h NFSD opt_nfs.h # filesystems and libiconv bridge CD9660_ICONV opt_dontuse.h MSDOSFS_ICONV opt_dontuse.h UDF_ICONV opt_dontuse.h # If you are following the conditions in the copyright, # you can enable soft-updates which will speed up a lot of thigs # and make the system safer from crashes at the same time. # otherwise a STUB module will be compiled in. SOFTUPDATES opt_ffs.h # On small, embedded systems, it can be useful to turn off support for # snapshots. It saves about 30-40k for a feature that would be lightly # used, if it is used at all. NO_FFS_SNAPSHOT opt_ffs.h # Enabling this option turns on support for Access Control Lists in UFS, # which can be used to support high security configurations. Depends on # UFS_EXTATTR. UFS_ACL opt_ufs.h # Enabling this option turns on support for extended attributes in UFS-based # filesystems, which can be used to support high security configurations # as well as new filesystem features. UFS_EXTATTR opt_ufs.h UFS_EXTATTR_AUTOSTART opt_ufs.h # Enable fast hash lookups for large directories on UFS-based filesystems. UFS_DIRHASH opt_ufs.h # Enable gjournal-based UFS journal. UFS_GJOURNAL opt_ufs.h # The below sentence is not in English, and neither is this one. # We plan to remove the static dependences above, with a # _ROOT option to control if it usable as root. This list # allows these options to be present in config files already (though # they won't make any difference yet). NFS_ROOT opt_nfsroot.h # SMB/CIFS requester NETSMB opt_netsmb.h # Enable netdump(4) client support. NETDUMP opt_global.h # Options used only in subr_param.c. HZ opt_param.h MAXFILES opt_param.h NBUF opt_param.h NSFBUFS opt_param.h VM_BCACHE_SIZE_MAX opt_param.h VM_SWZONE_SIZE_MAX opt_param.h MAXUSERS DFLDSIZ opt_param.h MAXDSIZ opt_param.h MAXSSIZ opt_param.h # Generic SCSI options. CAM_MAX_HIGHPOWER opt_cam.h CAMDEBUG opt_cam.h CAM_DEBUG_COMPILE opt_cam.h CAM_DEBUG_DELAY opt_cam.h CAM_DEBUG_BUS opt_cam.h CAM_DEBUG_TARGET opt_cam.h CAM_DEBUG_LUN opt_cam.h CAM_DEBUG_FLAGS opt_cam.h CAM_BOOT_DELAY opt_cam.h CAM_IOSCHED_DYNAMIC opt_cam.h CAM_TEST_FAILURE opt_cam.h SCSI_DELAY opt_scsi.h SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h # Options used only in cam/ata/ata_da.c ATA_STATIC_ID opt_ada.h # Options used only in cam/scsi/scsi_cd.c CHANGER_MIN_BUSY_SECONDS opt_cd.h CHANGER_MAX_BUSY_SECONDS opt_cd.h # Options used only in cam/scsi/scsi_da.c DA_TRACK_REFS opt_da.h # Options used only in cam/scsi/scsi_sa.c. SA_IO_TIMEOUT opt_sa.h SA_SPACE_TIMEOUT opt_sa.h SA_REWIND_TIMEOUT opt_sa.h SA_ERASE_TIMEOUT opt_sa.h SA_1FM_AT_EOD opt_sa.h # Options used only in cam/scsi/scsi_pt.c SCSI_PT_DEFAULT_TIMEOUT opt_pt.h # Options used only in cam/scsi/scsi_ses.c SES_ENABLE_PASSTHROUGH opt_ses.h # Options used in dev/sym/ (Symbios SCSI driver). SYM_SETUP_SCSI_DIFF opt_sym.h #-HVD support for 825a, 875, 885 # disabled:0 (default), enabled:1 SYM_SETUP_PCI_PARITY opt_sym.h #-PCI parity checking # disabled:0, enabled:1 (default) SYM_SETUP_MAX_LUN opt_sym.h #-Number of LUNs supported # default:8, range:[1..64] # Options used only in dev/isp/* ISP_TARGET_MODE opt_isp.h ISP_FW_CRASH_DUMP opt_isp.h ISP_DEFAULT_ROLES opt_isp.h ISP_INTERNAL_TARGET opt_isp.h ISP_FCTAPE_OFF opt_isp.h # Options used only in dev/iscsi ISCSI_INITIATOR_DEBUG opt_iscsi_initiator.h # Net stuff. ACCEPT_FILTER_DATA ACCEPT_FILTER_DNS ACCEPT_FILTER_HTTP ALTQ opt_global.h ALTQ_CBQ opt_altq.h ALTQ_CDNR opt_altq.h ALTQ_CODEL opt_altq.h ALTQ_DEBUG opt_altq.h ALTQ_HFSC opt_altq.h ALTQ_FAIRQ opt_altq.h ALTQ_NOPCC opt_altq.h ALTQ_PRIQ opt_altq.h ALTQ_RED opt_altq.h ALTQ_RIO opt_altq.h BOOTP opt_bootp.h BOOTP_BLOCKSIZE opt_bootp.h BOOTP_COMPAT opt_bootp.h BOOTP_NFSROOT opt_bootp.h BOOTP_NFSV3 opt_bootp.h BOOTP_WIRED_TO opt_bootp.h DEVICE_POLLING DUMMYNET opt_ipdn.h RATELIMIT opt_ratelimit.h RATELIMIT_DEBUG opt_ratelimit.h INET opt_inet.h INET6 opt_inet6.h +STATS opt_global.h IPDIVERT IPFILTER opt_ipfilter.h IPFILTER_DEFAULT_BLOCK opt_ipfilter.h IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h IPFIREWALL_NAT64 opt_ipfw.h IPFIREWALL_NPTV6 opt_ipfw.h IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPFIREWALL_PMOD opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h IPSEC_SUPPORT opt_ipsec.h IPSTEALTH KERN_TLS KRPC LIBALIAS LIBMCHAIN MBUF_PROFILING MBUF_STRESS_TEST MROUTING opt_mrouting.h NFSLOCKD PCBGROUP opt_pcbgroup.h PF_DEFAULT_TO_DROP opt_pf.h RADIX_MPATH opt_mpath.h ROUTETABLES opt_route.h RSS opt_rss.h SLIP_IFF_OPTS opt_slip.h TCPDEBUG TCPPCAP opt_global.h SIFTR TCP_BLACKBOX opt_global.h TCP_HHOOK opt_inet.h TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_RFC7413 opt_inet.h TCP_RFC7413_MAX_KEYS opt_inet.h TCP_RFC7413_MAX_PSKS opt_inet.h TCP_SIGNATURE opt_ipsec.h VLAN_ARRAY opt_vlan.h XBONEHACK # # SCTP # SCTP opt_sctp.h SCTP_DEBUG opt_sctp.h # Enable debug printfs SCTP_LOCK_LOGGING opt_sctp.h # Log to KTR lock activity SCTP_MBUF_LOGGING opt_sctp.h # Log to KTR general mbuf aloc/free SCTP_MBCNT_LOGGING opt_sctp.h # Log to KTR mbcnt activity SCTP_PACKET_LOGGING opt_sctp.h # Log to a packet buffer last N packets SCTP_LTRACE_CHUNKS opt_sctp.h # Log to KTR chunks processed SCTP_LTRACE_ERRORS opt_sctp.h # Log to KTR error returns. SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs SCTP_LOCAL_TRACE_BUF opt_sctp.h # Use tracebuffer exported via sysctl SCTP_DETAILED_STR_STATS opt_sctp.h # Use per PR-SCTP policy stream stats # # # # Netgraph(4). Use option NETGRAPH to enable the base netgraph code. # Each netgraph node type can be either be compiled into the kernel # or loaded dynamically. To get the former, include the corresponding # option below. Each type has its own man page, e.g. ng_async(4). NETGRAPH NETGRAPH_DEBUG opt_netgraph.h NETGRAPH_ASYNC opt_netgraph.h NETGRAPH_ATMLLC opt_netgraph.h NETGRAPH_ATM_ATMPIF opt_netgraph.h NETGRAPH_BLUETOOTH opt_netgraph.h NETGRAPH_BLUETOOTH_BT3C opt_netgraph.h NETGRAPH_BLUETOOTH_H4 opt_netgraph.h NETGRAPH_BLUETOOTH_HCI opt_netgraph.h NETGRAPH_BLUETOOTH_L2CAP opt_netgraph.h NETGRAPH_BLUETOOTH_SOCKET opt_netgraph.h NETGRAPH_BLUETOOTH_UBT opt_netgraph.h NETGRAPH_BLUETOOTH_UBTBCMFW opt_netgraph.h NETGRAPH_BPF opt_netgraph.h NETGRAPH_BRIDGE opt_netgraph.h NETGRAPH_CAR opt_netgraph.h NETGRAPH_CHECKSUM opt_netgraph.h NETGRAPH_CISCO opt_netgraph.h NETGRAPH_DEFLATE opt_netgraph.h NETGRAPH_DEVICE opt_netgraph.h NETGRAPH_ECHO opt_netgraph.h NETGRAPH_EIFACE opt_netgraph.h NETGRAPH_ETHER opt_netgraph.h NETGRAPH_ETHER_ECHO opt_netgraph.h NETGRAPH_FEC opt_netgraph.h NETGRAPH_FRAME_RELAY opt_netgraph.h NETGRAPH_GIF opt_netgraph.h NETGRAPH_GIF_DEMUX opt_netgraph.h NETGRAPH_HOLE opt_netgraph.h NETGRAPH_IFACE opt_netgraph.h NETGRAPH_IP_INPUT opt_netgraph.h NETGRAPH_IPFW opt_netgraph.h NETGRAPH_KSOCKET opt_netgraph.h NETGRAPH_L2TP opt_netgraph.h NETGRAPH_LMI opt_netgraph.h NETGRAPH_MPPC_COMPRESSION opt_netgraph.h NETGRAPH_MPPC_ENCRYPTION opt_netgraph.h NETGRAPH_NAT opt_netgraph.h NETGRAPH_NETFLOW opt_netgraph.h NETGRAPH_ONE2MANY opt_netgraph.h NETGRAPH_PATCH opt_netgraph.h NETGRAPH_PIPE opt_netgraph.h NETGRAPH_PPP opt_netgraph.h NETGRAPH_PPPOE opt_netgraph.h NETGRAPH_PPTPGRE opt_netgraph.h NETGRAPH_PRED1 opt_netgraph.h NETGRAPH_RFC1490 opt_netgraph.h NETGRAPH_SOCKET opt_netgraph.h NETGRAPH_SPLIT opt_netgraph.h NETGRAPH_SPPP opt_netgraph.h NETGRAPH_TAG opt_netgraph.h NETGRAPH_TCPMSS opt_netgraph.h NETGRAPH_TEE opt_netgraph.h NETGRAPH_TTY opt_netgraph.h NETGRAPH_UI opt_netgraph.h NETGRAPH_VJC opt_netgraph.h NETGRAPH_VLAN opt_netgraph.h # NgATM options NGATM_ATM opt_netgraph.h NGATM_ATMBASE opt_netgraph.h NGATM_SSCOP opt_netgraph.h NGATM_SSCFU opt_netgraph.h NGATM_UNI opt_netgraph.h NGATM_CCATM opt_netgraph.h # DRM options DRM_DEBUG opt_drm.h TI_SF_BUF_JUMBO opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h # Misc debug flags. Most of these should probably be replaced with # 'DEBUG', and then let people recompile just the interesting modules # with 'make CC="cc -DDEBUG"'. CLUSTERDEBUG opt_debug_cluster.h DEBUG_1284 opt_ppb_1284.h VP0_DEBUG opt_vpo.h LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h LOCKF_DEBUG opt_debug_lockf.h SI_DEBUG opt_debug_si.h IFMEDIA_DEBUG opt_ifmedia.h # Fb options FB_DEBUG opt_fb.h FB_INSTALL_CDEV opt_fb.h # ppbus related options PERIPH_1284 opt_ppb_1284.h DONTPROBE_1284 opt_ppb_1284.h # smbus related options ENABLE_ALART opt_intpm.h # These cause changes all over the kernel BLKDEV_IOSIZE opt_global.h BURN_BRIDGES opt_global.h DEBUG opt_global.h DEBUG_LOCKS opt_global.h DEBUG_VFS_LOCKS opt_global.h DFLTPHYS opt_global.h DIAGNOSTIC opt_global.h INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h KASSERT_PANIC_OPTIONAL opt_global.h MAXCPU opt_global.h MAXMEMDOM opt_global.h MAXPHYS opt_global.h MCLSHIFT opt_global.h MUTEX_NOINLINE opt_global.h LOCK_PROFILING opt_global.h LOCK_PROFILING_FAST opt_global.h MSIZE opt_global.h REGRESSION opt_global.h RWLOCK_NOINLINE opt_global.h SX_NOINLINE opt_global.h VFS_BIO_DEBUG opt_global.h # These are VM related options VM_KMEM_SIZE opt_vm.h VM_KMEM_SIZE_SCALE opt_vm.h VM_KMEM_SIZE_MAX opt_vm.h VM_NRESERVLEVEL opt_vm.h VM_LEVEL_0_ORDER opt_vm.h NO_SWAPPING opt_vm.h MALLOC_MAKE_FAILURES opt_vm.h MALLOC_PROFILE opt_vm.h MALLOC_DEBUG_MAXZONES opt_vm.h UMA_XDOMAIN opt_vm.h UMA_FIRSTTOUCH opt_vm.h # The MemGuard replacement allocator used for tamper-after-free detection DEBUG_MEMGUARD opt_vm.h # The RedZone malloc(9) protection DEBUG_REDZONE opt_vm.h # Standard SMP options EARLY_AP_STARTUP opt_global.h SMP opt_global.h NUMA opt_global.h # Size of the kernel message buffer MSGBUF_SIZE opt_msgbuf.h # NFS options NFS_MINATTRTIMO opt_nfs.h NFS_MAXATTRTIMO opt_nfs.h NFS_MINDIRATTRTIMO opt_nfs.h NFS_MAXDIRATTRTIMO opt_nfs.h NFS_DEBUG opt_nfs.h # TMPFS options TMPFS_PAGES_MINRESERVED opt_tmpfs.h # For the Bt848/Bt848A/Bt849/Bt878/Bt879 driver OVERRIDE_CARD opt_bktr.h OVERRIDE_TUNER opt_bktr.h OVERRIDE_DBX opt_bktr.h OVERRIDE_MSP opt_bktr.h BROOKTREE_SYSTEM_DEFAULT opt_bktr.h BROOKTREE_ALLOC_PAGES opt_bktr.h BKTR_OVERRIDE_CARD opt_bktr.h BKTR_OVERRIDE_TUNER opt_bktr.h BKTR_OVERRIDE_DBX opt_bktr.h BKTR_OVERRIDE_MSP opt_bktr.h BKTR_SYSTEM_DEFAULT opt_bktr.h BKTR_ALLOC_PAGES opt_bktr.h BKTR_USE_PLL opt_bktr.h BKTR_GPIO_ACCESS opt_bktr.h BKTR_NO_MSP_RESET opt_bktr.h BKTR_430_FX_MODE opt_bktr.h BKTR_SIS_VIA_MODE opt_bktr.h BKTR_USE_FREEBSD_SMBUS opt_bktr.h BKTR_NEW_MSP34XX_DRIVER opt_bktr.h # Options for uart(4) UART_PPS_ON_CTS opt_uart.h UART_POLL_FREQ opt_uart.h UART_DEV_TOLERANCE_PCT opt_uart.h # options for bus/device framework BUS_DEBUG opt_bus.h # options for USB support USB_DEBUG opt_usb.h USB_HOST_ALIGN opt_usb.h USB_REQ_DEBUG opt_usb.h USB_TEMPLATE opt_usb.h USB_VERBOSE opt_usb.h USB_DMA_SINGLE_ALLOC opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h UKBD_DFLT_KEYMAP opt_ukbd.h UPLCOM_INTR_INTERVAL opt_uplcom.h UVSCOM_DEFAULT_OPKTSIZE opt_uvscom.h UVSCOM_INTR_INTERVAL opt_uvscom.h # options for the Realtek rtwn driver RTWN_DEBUG opt_rtwn.h RTWN_WITHOUT_UCODE opt_rtwn.h # Embedded system options INIT_PATH ROOTDEVNAME FDC_DEBUG opt_fdc.h PCFCLOCK_VERBOSE opt_pcfclock.h PCFCLOCK_MAX_RETRIES opt_pcfclock.h KTR opt_global.h KTR_ALQ opt_ktr.h KTR_MASK opt_ktr.h KTR_CPUMASK opt_ktr.h KTR_COMPILE opt_global.h KTR_BOOT_ENTRIES opt_global.h KTR_ENTRIES opt_global.h KTR_VERBOSE opt_ktr.h WITNESS opt_global.h WITNESS_KDB opt_witness.h WITNESS_NO_VNODE opt_witness.h WITNESS_SKIPSPIN opt_witness.h WITNESS_COUNT opt_witness.h OPENSOLARIS_WITNESS opt_global.h EPOCH_TRACE opt_global.h # options for ACPI support ACPI_DEBUG opt_acpi.h ACPI_MAX_TASKS opt_acpi.h ACPI_MAX_THREADS opt_acpi.h ACPI_DMAR opt_acpi.h DEV_ACPI opt_acpi.h # ISA support DEV_ISA opt_isa.h ISAPNP opt_isa.h # various 'device presence' options. DEV_BPF opt_bpf.h DEV_CARP opt_carp.h DEV_NETMAP opt_global.h DEV_PCI opt_pci.h DEV_PF opt_pf.h DEV_PFLOG opt_pf.h DEV_PFSYNC opt_pf.h DEV_SPLASH opt_splash.h DEV_VLAN opt_vlan.h # ed driver ED_HPP opt_ed.h ED_3C503 opt_ed.h ED_SIC opt_ed.h # bce driver BCE_DEBUG opt_bce.h BCE_NVRAM_WRITE_SUPPORT opt_bce.h SOCKBUF_DEBUG opt_global.h # options for ubsec driver UBSEC_DEBUG opt_ubsec.h UBSEC_RNDTEST opt_ubsec.h UBSEC_NO_RNG opt_ubsec.h # options for hifn driver HIFN_DEBUG opt_hifn.h HIFN_RNDTEST opt_hifn.h # options for safenet driver SAFE_DEBUG opt_safe.h SAFE_NO_RNG opt_safe.h SAFE_RNDTEST opt_safe.h # syscons/vt options MAXCONS opt_syscons.h SC_ALT_MOUSE_IMAGE opt_syscons.h SC_CUT_SPACES2TABS opt_syscons.h SC_CUT_SEPCHARS opt_syscons.h SC_DEBUG_LEVEL opt_syscons.h SC_DFLT_FONT opt_syscons.h SC_DFLT_TERM opt_syscons.h SC_DISABLE_KDBKEY opt_syscons.h SC_DISABLE_REBOOT opt_syscons.h SC_HISTORY_SIZE opt_syscons.h SC_KERNEL_CONS_ATTR opt_syscons.h SC_KERNEL_CONS_ATTRS opt_syscons.h SC_KERNEL_CONS_REV_ATTR opt_syscons.h SC_MOUSE_CHAR opt_syscons.h SC_NO_CUTPASTE opt_syscons.h SC_NO_FONT_LOADING opt_syscons.h SC_NO_HISTORY opt_syscons.h SC_NO_MODE_CHANGE opt_syscons.h SC_NO_SUSPEND_VTYSWITCH opt_syscons.h SC_NO_SYSMOUSE opt_syscons.h SC_NO_TERM_DUMB opt_syscons.h SC_NO_TERM_SC opt_syscons.h SC_NO_TERM_TEKEN opt_syscons.h SC_NORM_ATTR opt_syscons.h SC_NORM_REV_ATTR opt_syscons.h SC_PIXEL_MODE opt_syscons.h SC_RENDER_DEBUG opt_syscons.h SC_TWOBUTTON_MOUSE opt_syscons.h VT_ALT_TO_ESC_HACK opt_syscons.h VT_FB_DEFAULT_WIDTH opt_syscons.h VT_FB_DEFAULT_HEIGHT opt_syscons.h VT_MAXWINDOWS opt_syscons.h VT_TWOBUTTON_MOUSE opt_syscons.h DEV_SC opt_syscons.h DEV_VT opt_syscons.h # teken terminal emulator options TEKEN_CONS25 opt_teken.h TEKEN_UTF8 opt_teken.h TERMINAL_KERN_ATTR opt_teken.h TERMINAL_NORM_ATTR opt_teken.h # options for printf PRINTF_BUFR_SIZE opt_printf.h BOOT_TAG opt_printf.h BOOT_TAG_SZ opt_printf.h # kbd options KBD_DISABLE_KEYMAP_LOAD opt_kbd.h KBD_INSTALL_CDEV opt_kbd.h KBD_MAXRETRY opt_kbd.h KBD_MAXWAIT opt_kbd.h KBD_RESETDELAY opt_kbd.h KBDIO_DEBUG opt_kbd.h KBDMUX_DFLT_KEYMAP opt_kbdmux.h # options for the Atheros driver ATH_DEBUG opt_ath.h ATH_TXBUF opt_ath.h ATH_RXBUF opt_ath.h ATH_DIAGAPI opt_ath.h ATH_TX99_DIAG opt_ath.h ATH_ENABLE_11N opt_ath.h ATH_ENABLE_DFS opt_ath.h ATH_EEPROM_FIRMWARE opt_ath.h ATH_ENABLE_RADIOTAP_VENDOR_EXT opt_ath.h ATH_DEBUG_ALQ opt_ath.h ATH_KTR_INTR_DEBUG opt_ath.h # options for the Atheros hal # XXX For now, this breaks non-AR9130 chipsets, so only use it # XXX when actually targeting AR9130. AH_SUPPORT_AR9130 opt_ah.h # This is required for AR933x SoC support AH_SUPPORT_AR9330 opt_ah.h AH_SUPPORT_AR9340 opt_ah.h AH_SUPPORT_QCA9530 opt_ah.h AH_SUPPORT_QCA9550 opt_ah.h AH_DEBUG opt_ah.h AH_ASSERT opt_ah.h AH_DEBUG_ALQ opt_ah.h AH_REGOPS_FUNC opt_ah.h AH_WRITE_REGDOMAIN opt_ah.h AH_DEBUG_COUNTRY opt_ah.h AH_WRITE_EEPROM opt_ah.h AH_PRIVATE_DIAG opt_ah.h AH_NEED_DESC_SWAP opt_ah.h AH_USE_INIPDGAIN opt_ah.h AH_MAXCHAN opt_ah.h AH_RXCFG_SDMAMW_4BYTES opt_ah.h AH_INTERRUPT_DEBUGGING opt_ah.h # AR5416 and later interrupt mitigation # XXX do not use this for AR9130 AH_AR5416_INTERRUPT_MITIGATION opt_ah.h # options for the Altera mSGDMA driver (altera_msgdma) ALTERA_MSGDMA_DESC_STD opt_altera_msgdma.h ALTERA_MSGDMA_DESC_EXT opt_altera_msgdma.h ALTERA_MSGDMA_DESC_PF_STD opt_altera_msgdma.h ALTERA_MSGDMA_DESC_PF_EXT opt_altera_msgdma.h # options for the Broadcom BCM43xx driver (bwi) BWI_DEBUG opt_bwi.h BWI_DEBUG_VERBOSE opt_bwi.h # options for the Brodacom BCM43xx driver (bwn) BWN_DEBUG opt_bwn.h BWN_GPL_PHY opt_bwn.h BWN_USE_SIBA opt_bwn.h # Options for the SIBA driver SIBA_DEBUG opt_siba.h # options for the Marvell 8335 wireless driver MALO_DEBUG opt_malo.h MALO_TXBUF opt_malo.h MALO_RXBUF opt_malo.h # options for the Marvell wireless driver MWL_DEBUG opt_mwl.h MWL_TXBUF opt_mwl.h MWL_RXBUF opt_mwl.h MWL_DIAGAPI opt_mwl.h MWL_AGGR_SIZE opt_mwl.h MWL_TX_NODROP opt_mwl.h # Options for the Marvell NETA driver MVNETA_MULTIQUEUE opt_mvneta.h MVNETA_KTR opt_mvneta.h # Options for the Intel 802.11ac wireless driver IWM_DEBUG opt_iwm.h # Options for the Intel 802.11n wireless driver IWN_DEBUG opt_iwn.h # Options for the Intel 3945ABG wireless driver WPI_DEBUG opt_wpi.h # dcons options DCONS_BUF_SIZE opt_dcons.h DCONS_POLL_HZ opt_dcons.h DCONS_FORCE_CONSOLE opt_dcons.h DCONS_FORCE_GDB opt_dcons.h # HWPMC options HWPMC_DEBUG opt_global.h HWPMC_HOOKS HWPMC_MIPS_BACKTRACE opt_hwpmc_hooks.h # 802.11 support layer IEEE80211_DEBUG opt_wlan.h IEEE80211_DEBUG_REFCNT opt_wlan.h IEEE80211_SUPPORT_MESH opt_wlan.h IEEE80211_SUPPORT_SUPERG opt_wlan.h IEEE80211_SUPPORT_TDMA opt_wlan.h IEEE80211_ALQ opt_wlan.h IEEE80211_DFS_DEBUG opt_wlan.h # 802.11 TDMA support TDMA_SLOTLEN_DEFAULT opt_tdma.h TDMA_SLOTCNT_DEFAULT opt_tdma.h TDMA_BINTVAL_DEFAULT opt_tdma.h TDMA_TXRATE_11B_DEFAULT opt_tdma.h TDMA_TXRATE_11G_DEFAULT opt_tdma.h TDMA_TXRATE_11A_DEFAULT opt_tdma.h TDMA_TXRATE_TURBO_DEFAULT opt_tdma.h TDMA_TXRATE_HALF_DEFAULT opt_tdma.h TDMA_TXRATE_QUARTER_DEFAULT opt_tdma.h TDMA_TXRATE_11NA_DEFAULT opt_tdma.h TDMA_TXRATE_11NG_DEFAULT opt_tdma.h # VideoMode PICKMODE_DEBUG opt_videomode.h # Network stack virtualization options VIMAGE opt_global.h VNET_DEBUG opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h CFI_ARMEDANDDANGEROUS opt_cfi.h CFI_HARDWAREBYTESWAP opt_cfi.h # Sound options SND_DEBUG opt_snd.h SND_DIAGNOSTIC opt_snd.h SND_FEEDER_MULTIFORMAT opt_snd.h SND_FEEDER_FULL_MULTIFORMAT opt_snd.h SND_FEEDER_RATE_HP opt_snd.h SND_PCM_64 opt_snd.h SND_OLDSTEREO opt_snd.h X86BIOS # Flattened device tree options FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h IPOIB opt_ofed.h IPOIB_DEBUG opt_ofed.h IPOIB_CM opt_ofed.h # Resource Accounting RACCT opt_global.h RACCT_DEFAULT_TO_DISABLED opt_global.h # Resource Limits RCTL opt_global.h # Random number generator(s) # With this, no entropy processor is loaded, but the entropy # harvesting infrastructure is present. This means an entropy # processor may be loaded as a module. RANDOM_LOADABLE opt_global.h # This turns on high-rate and potentially expensive harvesting in # the uma slab allocator. RANDOM_ENABLE_UMA opt_global.h RANDOM_ENABLE_ETHER opt_global.h # This options turns TPM into entropy source. TPM_HARVEST opt_tpm.h # BHND(4) driver BHND_LOGLEVEL opt_global.h # GPIO and child devices GPIO_SPI_DEBUG opt_gpio.h # SPI devices SPIGEN_LEGACY_CDEVNAME opt_spi.h # etherswitch(4) driver RTL8366_SOFT_RESET opt_etherswitch.h # evdev protocol support EVDEV_SUPPORT opt_evdev.h EVDEV_DEBUG opt_evdev.h UINPUT_DEBUG opt_evdev.h # Hyper-V network driver HN_DEBUG opt_hn.h # CAM-based MMC stack MMCCAM # Encrypted kernel crash dumps EKCD opt_ekcd.h # NVME options NVME_USE_NVD opt_nvme.h # amdsbwd options AMDSBWD_DEBUG opt_amdsbwd.h # gcov support GCOV opt_global.h LINDEBUGFS Index: head/sys/kern/subr_stats.c =================================================================== --- head/sys/kern/subr_stats.c (nonexistent) +++ head/sys/kern/subr_stats.c (revision 353283) @@ -0,0 +1,3912 @@ +/*- + * Copyright (c) 2014-2018 Netflix, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Author: Lawrence Stewart + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if defined(DIAGNOSTIC) +#include +#endif +#include /* Must come after qmath.h and arb.h */ +#include +#include +#include + +#ifdef _KERNEL +#include +#include +#include +#include +#include +#else /* ! _KERNEL */ +#include +#include +#include +#include +#include +#endif /* _KERNEL */ + +struct voistatdata_voistate { + /* Previous VOI value for diff calculation. */ + struct voistatdata_numeric prev; +}; + +#define VS_VSDVALID 0x0001 /* Stat's voistatdata updated at least once. */ +struct voistat { + int8_t stype; /* Type of stat e.g. VS_STYPE_SUM. */ + enum vsd_dtype dtype : 8; /* Data type of this stat's data. */ + uint16_t data_off; /* Blob offset for this stat's data. */ + uint16_t dsz; /* Size of stat's data. */ +#define VS_EBITS 8 + uint16_t errs : VS_EBITS;/* Non-wrapping error count. */ + uint16_t flags : 16 - VS_EBITS; +}; +/* The voistat error count is capped to avoid wrapping. */ +#define VS_INCERRS(vs) do { \ + if ((vs)->errs < (1U << VS_EBITS) - 1) \ + (vs)->errs++; \ +} while (0) + +/* + * Ideas for flags: + * - Global or entity specific (global would imply use of counter(9)?) + * - Whether to reset stats on read or not + * - Signal an overflow? + * - Compressed voistat array + */ +#define VOI_REQSTATE 0x0001 /* VOI requires VS_STYPE_VOISTATE. */ +struct voi { + int16_t id; /* VOI id. */ + enum vsd_dtype dtype : 8; /* Data type of the VOI itself. */ + int8_t voistatmaxid; /* Largest allocated voistat index. */ + uint16_t stats_off; /* Blob offset for this VOIs stats. */ + uint16_t flags; +}; + +/* + * Memory for the entire blob is allocated as a slab and then offsets are + * maintained to carve up the slab into sections holding different data types. + * + * Ideas for flags: + * - Compressed voi array (trade off memory usage vs search time) + * - Units of offsets (default bytes, flag for e.g. vm_page/KiB/Mib) + */ +struct statsblobv1 { + uint8_t abi; + uint8_t endian; + uint16_t flags; + uint16_t maxsz; + uint16_t cursz; + /* Fields from here down are opaque to consumers. */ + uint32_t tplhash; /* Base template hash ID. */ + uint16_t stats_off; /* voistat array blob offset. */ + uint16_t statsdata_off; /* voistatdata array blob offset. */ + sbintime_t created; /* Blob creation time. */ + sbintime_t lastrst; /* Time of last reset. */ + struct voi vois[]; /* Array indexed by [voi_id]. */ +} __aligned(sizeof(void *)); +_Static_assert(offsetof(struct statsblobv1, cursz) + + SIZEOF_MEMBER(struct statsblobv1, cursz) == sizeof(struct statsblob), + "statsblobv1 ABI mismatch"); + +struct statsblobv1_tpl { + struct metablob *mb; + struct statsblobv1 *sb; +}; + +/* Context passed to iterator callbacks. */ +struct sb_iter_ctx { + void *usrctx; /* Caller supplied context. */ + uint32_t flags; /* Flags for current iteration. */ + int16_t vslot; /* struct voi slot index. */ + int8_t vsslot; /* struct voistat slot index. */ +}; + +struct sb_tostrcb_ctx { + struct sbuf *buf; + struct statsblob_tpl *tpl; + enum sb_str_fmt fmt; + uint32_t flags; +}; + +struct sb_visitcb_ctx { + stats_blob_visitcb_t cb; + void *usrctx; +}; + +/* Stats blob iterator callback. */ +typedef int (*stats_v1_blob_itercb_t)(struct statsblobv1 *sb, struct voi *v, + struct voistat *vs, struct sb_iter_ctx *ctx); + +#ifdef _KERNEL +static struct rwlock tpllistlock; +RW_SYSINIT(stats_tpl_list, &tpllistlock, "Stat template list lock"); +#define TPL_LIST_RLOCK() rw_rlock(&tpllistlock) +#define TPL_LIST_RUNLOCK() rw_runlock(&tpllistlock) +#define TPL_LIST_WLOCK() rw_wlock(&tpllistlock) +#define TPL_LIST_WUNLOCK() rw_wunlock(&tpllistlock) +#define TPL_LIST_LOCK_ASSERT() rw_assert(&tpllistlock, RA_LOCKED) +#define TPL_LIST_RLOCK_ASSERT() rw_assert(&tpllistlock, RA_RLOCKED) +#define TPL_LIST_WLOCK_ASSERT() rw_assert(&tpllistlock, RA_WLOCKED) +MALLOC_DEFINE(M_STATS, "stats(9) related memory", "stats(9) related memory"); +#define stats_free(ptr) free((ptr), M_STATS) +#else /* ! _KERNEL */ +static void stats_constructor(void); +static void stats_destructor(void); +static pthread_rwlock_t tpllistlock; +#define TPL_LIST_UNLOCK() pthread_rwlock_unlock(&tpllistlock) +#define TPL_LIST_RLOCK() pthread_rwlock_rdlock(&tpllistlock) +#define TPL_LIST_RUNLOCK() TPL_LIST_UNLOCK() +#define TPL_LIST_WLOCK() pthread_rwlock_wrlock(&tpllistlock) +#define TPL_LIST_WUNLOCK() TPL_LIST_UNLOCK() +#define TPL_LIST_LOCK_ASSERT() do { } while (0) +#define TPL_LIST_RLOCK_ASSERT() do { } while (0) +#define TPL_LIST_WLOCK_ASSERT() do { } while (0) +#ifdef NDEBUG +#define KASSERT(cond, msg) do {} while (0) +#define stats_abort() do {} while (0) +#else /* ! NDEBUG */ +#define KASSERT(cond, msg) do { \ + if (!(cond)) { \ + panic msg; \ + } \ +} while (0) +#define stats_abort() abort() +#endif /* NDEBUG */ +#define stats_free(ptr) free(ptr) +#define panic(fmt, ...) do { \ + fprintf(stderr, (fmt), ##__VA_ARGS__); \ + stats_abort(); \ +} while (0) +#endif /* _KERNEL */ + +#define SB_V1_MAXSZ 65535 + +/* Obtain a blob offset pointer. */ +#define BLOB_OFFSET(sb, off) ((void *)(((uint8_t *)(sb)) + (off))) + +/* + * Number of VOIs in the blob's vois[] array. By virtue of struct voi being a + * power of 2 size, we can shift instead of divide. The shift amount must be + * updated if sizeof(struct voi) ever changes, which the assert should catch. + */ +#define NVOIS(sb) ((int32_t)((((struct statsblobv1 *)(sb))->stats_off - \ + sizeof(struct statsblobv1)) >> 3)) +_Static_assert(sizeof(struct voi) == 8, "statsblobv1 voi ABI mismatch"); + +/* Try restrict names to alphanumeric and underscore to simplify JSON compat. */ +const char *vs_stype2name[VS_NUM_STYPES] = { + [VS_STYPE_VOISTATE] = "VOISTATE", + [VS_STYPE_SUM] = "SUM", + [VS_STYPE_MAX] = "MAX", + [VS_STYPE_MIN] = "MIN", + [VS_STYPE_HIST] = "HIST", + [VS_STYPE_TDGST] = "TDGST", +}; + +const char *vs_stype2desc[VS_NUM_STYPES] = { + [VS_STYPE_VOISTATE] = "VOI related state data (not a real stat)", + [VS_STYPE_SUM] = "Simple arithmetic accumulator", + [VS_STYPE_MAX] = "Maximum observed VOI value", + [VS_STYPE_MIN] = "Minimum observed VOI value", + [VS_STYPE_HIST] = "Histogram of observed VOI values", + [VS_STYPE_TDGST] = "t-digest of observed VOI values", +}; + +const char *vsd_dtype2name[VSD_NUM_DTYPES] = { + [VSD_DTYPE_VOISTATE] = "VOISTATE", + [VSD_DTYPE_INT_S32] = "INT_S32", + [VSD_DTYPE_INT_U32] = "INT_U32", + [VSD_DTYPE_INT_S64] = "INT_S64", + [VSD_DTYPE_INT_U64] = "INT_U64", + [VSD_DTYPE_INT_SLONG] = "INT_SLONG", + [VSD_DTYPE_INT_ULONG] = "INT_ULONG", + [VSD_DTYPE_Q_S32] = "Q_S32", + [VSD_DTYPE_Q_U32] = "Q_U32", + [VSD_DTYPE_Q_S64] = "Q_S64", + [VSD_DTYPE_Q_U64] = "Q_U64", + [VSD_DTYPE_CRHIST32] = "CRHIST32", + [VSD_DTYPE_DRHIST32] = "DRHIST32", + [VSD_DTYPE_DVHIST32] = "DVHIST32", + [VSD_DTYPE_CRHIST64] = "CRHIST64", + [VSD_DTYPE_DRHIST64] = "DRHIST64", + [VSD_DTYPE_DVHIST64] = "DVHIST64", + [VSD_DTYPE_TDGSTCLUST32] = "TDGSTCLUST32", + [VSD_DTYPE_TDGSTCLUST64] = "TDGSTCLUST64", +}; + +const size_t vsd_dtype2size[VSD_NUM_DTYPES] = { + [VSD_DTYPE_VOISTATE] = sizeof(struct voistatdata_voistate), + [VSD_DTYPE_INT_S32] = sizeof(struct voistatdata_int32), + [VSD_DTYPE_INT_U32] = sizeof(struct voistatdata_int32), + [VSD_DTYPE_INT_S64] = sizeof(struct voistatdata_int64), + [VSD_DTYPE_INT_U64] = sizeof(struct voistatdata_int64), + [VSD_DTYPE_INT_SLONG] = sizeof(struct voistatdata_intlong), + [VSD_DTYPE_INT_ULONG] = sizeof(struct voistatdata_intlong), + [VSD_DTYPE_Q_S32] = sizeof(struct voistatdata_q32), + [VSD_DTYPE_Q_U32] = sizeof(struct voistatdata_q32), + [VSD_DTYPE_Q_S64] = sizeof(struct voistatdata_q64), + [VSD_DTYPE_Q_U64] = sizeof(struct voistatdata_q64), + [VSD_DTYPE_CRHIST32] = sizeof(struct voistatdata_crhist32), + [VSD_DTYPE_DRHIST32] = sizeof(struct voistatdata_drhist32), + [VSD_DTYPE_DVHIST32] = sizeof(struct voistatdata_dvhist32), + [VSD_DTYPE_CRHIST64] = sizeof(struct voistatdata_crhist64), + [VSD_DTYPE_DRHIST64] = sizeof(struct voistatdata_drhist64), + [VSD_DTYPE_DVHIST64] = sizeof(struct voistatdata_dvhist64), + [VSD_DTYPE_TDGSTCLUST32] = sizeof(struct voistatdata_tdgstclust32), + [VSD_DTYPE_TDGSTCLUST64] = sizeof(struct voistatdata_tdgstclust64), +}; + +static const bool vsd_compoundtype[VSD_NUM_DTYPES] = { + [VSD_DTYPE_VOISTATE] = true, + [VSD_DTYPE_INT_S32] = false, + [VSD_DTYPE_INT_U32] = false, + [VSD_DTYPE_INT_S64] = false, + [VSD_DTYPE_INT_U64] = false, + [VSD_DTYPE_INT_SLONG] = false, + [VSD_DTYPE_INT_ULONG] = false, + [VSD_DTYPE_Q_S32] = false, + [VSD_DTYPE_Q_U32] = false, + [VSD_DTYPE_Q_S64] = false, + [VSD_DTYPE_Q_U64] = false, + [VSD_DTYPE_CRHIST32] = true, + [VSD_DTYPE_DRHIST32] = true, + [VSD_DTYPE_DVHIST32] = true, + [VSD_DTYPE_CRHIST64] = true, + [VSD_DTYPE_DRHIST64] = true, + [VSD_DTYPE_DVHIST64] = true, + [VSD_DTYPE_TDGSTCLUST32] = true, + [VSD_DTYPE_TDGSTCLUST64] = true, +}; + +const struct voistatdata_numeric numeric_limits[2][VSD_DTYPE_Q_U64 + 1] = { + [LIM_MIN] = { + [VSD_DTYPE_VOISTATE] = {0}, + [VSD_DTYPE_INT_S32] = {.int32 = {.s32 = INT32_MIN}}, + [VSD_DTYPE_INT_U32] = {.int32 = {.u32 = 0}}, + [VSD_DTYPE_INT_S64] = {.int64 = {.s64 = INT64_MIN}}, + [VSD_DTYPE_INT_U64] = {.int64 = {.u64 = 0}}, + [VSD_DTYPE_INT_SLONG] = {.intlong = {.slong = LONG_MIN}}, + [VSD_DTYPE_INT_ULONG] = {.intlong = {.ulong = 0}}, + [VSD_DTYPE_Q_S32] = {.q32 = {.sq32 = Q_IFMINVAL(INT32_MIN)}}, + [VSD_DTYPE_Q_U32] = {.q32 = {.uq32 = 0}}, + [VSD_DTYPE_Q_S64] = {.q64 = {.sq64 = Q_IFMINVAL(INT64_MIN)}}, + [VSD_DTYPE_Q_U64] = {.q64 = {.uq64 = 0}}, + }, + [LIM_MAX] = { + [VSD_DTYPE_VOISTATE] = {0}, + [VSD_DTYPE_INT_S32] = {.int32 = {.s32 = INT32_MAX}}, + [VSD_DTYPE_INT_U32] = {.int32 = {.u32 = UINT32_MAX}}, + [VSD_DTYPE_INT_S64] = {.int64 = {.s64 = INT64_MAX}}, + [VSD_DTYPE_INT_U64] = {.int64 = {.u64 = UINT64_MAX}}, + [VSD_DTYPE_INT_SLONG] = {.intlong = {.slong = LONG_MAX}}, + [VSD_DTYPE_INT_ULONG] = {.intlong = {.ulong = ULONG_MAX}}, + [VSD_DTYPE_Q_S32] = {.q32 = {.sq32 = Q_IFMAXVAL(INT32_MAX)}}, + [VSD_DTYPE_Q_U32] = {.q32 = {.uq32 = Q_IFMAXVAL(UINT32_MAX)}}, + [VSD_DTYPE_Q_S64] = {.q64 = {.sq64 = Q_IFMAXVAL(INT64_MAX)}}, + [VSD_DTYPE_Q_U64] = {.q64 = {.uq64 = Q_IFMAXVAL(UINT64_MAX)}}, + } +}; + +/* tpllistlock protects tpllist and ntpl */ +static uint32_t ntpl; +static struct statsblob_tpl **tpllist; + +static inline void * stats_realloc(void *ptr, size_t oldsz, size_t newsz, + int flags); +//static void stats_v1_blob_finalise(struct statsblobv1 *sb); +static int stats_v1_blob_init_locked(struct statsblobv1 *sb, uint32_t tpl_id, + uint32_t flags); +static int stats_v1_blob_expand(struct statsblobv1 **sbpp, int newvoibytes, + int newvoistatbytes, int newvoistatdatabytes); +static void stats_v1_blob_iter(struct statsblobv1 *sb, + stats_v1_blob_itercb_t icb, void *usrctx, uint32_t flags); +static inline int stats_v1_vsd_tdgst_add(enum vsd_dtype vs_dtype, + struct voistatdata_tdgst *tdgst, s64q_t x, uint64_t weight, int attempt); + +static inline int +ctd32cmp(const struct voistatdata_tdgstctd32 *c1, const struct voistatdata_tdgstctd32 *c2) +{ + + KASSERT(Q_PRECEQ(c1->mu, c2->mu), + ("%s: Q_RELPREC(c1->mu,c2->mu)=%d", __func__, + Q_RELPREC(c1->mu, c2->mu))); + + return (Q_QLTQ(c1->mu, c2->mu) ? -1 : 1); +} +ARB_GENERATE_STATIC(ctdth32, voistatdata_tdgstctd32, ctdlnk, ctd32cmp); + +static inline int +ctd64cmp(const struct voistatdata_tdgstctd64 *c1, const struct voistatdata_tdgstctd64 *c2) +{ + + KASSERT(Q_PRECEQ(c1->mu, c2->mu), + ("%s: Q_RELPREC(c1->mu,c2->mu)=%d", __func__, + Q_RELPREC(c1->mu, c2->mu))); + + return (Q_QLTQ(c1->mu, c2->mu) ? -1 : 1); +} +ARB_GENERATE_STATIC(ctdth64, voistatdata_tdgstctd64, ctdlnk, ctd64cmp); + +#ifdef DIAGNOSTIC +RB_GENERATE_STATIC(rbctdth32, voistatdata_tdgstctd32, rblnk, ctd32cmp); +RB_GENERATE_STATIC(rbctdth64, voistatdata_tdgstctd64, rblnk, ctd64cmp); +#endif + +static inline sbintime_t +stats_sbinuptime(void) +{ + sbintime_t sbt; +#ifdef _KERNEL + + sbt = sbinuptime(); +#else /* ! _KERNEL */ + struct timespec tp; + + clock_gettime(CLOCK_MONOTONIC_FAST, &tp); + sbt = tstosbt(tp); +#endif /* _KERNEL */ + + return (sbt); +} + +static inline void * +stats_realloc(void *ptr, size_t oldsz, size_t newsz, int flags) +{ + +#ifdef _KERNEL + /* Default to M_NOWAIT if neither M_NOWAIT or M_WAITOK are set. */ + if (!(flags & (M_WAITOK | M_NOWAIT))) + flags |= M_NOWAIT; + ptr = realloc(ptr, newsz, M_STATS, flags); +#else /* ! _KERNEL */ + ptr = realloc(ptr, newsz); + if ((flags & M_ZERO) && ptr != NULL) { + if (oldsz == 0) + memset(ptr, '\0', newsz); + else if (newsz > oldsz) + memset(BLOB_OFFSET(ptr, oldsz), '\0', newsz - oldsz); + } +#endif /* _KERNEL */ + + return (ptr); +} + +static inline char * +stats_strdup(const char *s, +#ifdef _KERNEL + int flags) +{ + char *copy; + size_t len; + + if (!(flags & (M_WAITOK | M_NOWAIT))) + flags |= M_NOWAIT; + + len = strlen(s) + 1; + if ((copy = malloc(len, M_STATS, flags)) != NULL) + bcopy(s, copy, len); + + return (copy); +#else + int flags __unused) +{ + return (strdup(s)); +#endif +} + +static inline void +stats_tpl_update_hash(struct statsblob_tpl *tpl) +{ + + TPL_LIST_WLOCK_ASSERT(); + tpl->mb->tplhash = hash32_str(tpl->mb->tplname, 0); + for (int voi_id = 0; voi_id < NVOIS(tpl->sb); voi_id++) { + if (tpl->mb->voi_meta[voi_id].name != NULL) + tpl->mb->tplhash = hash32_str( + tpl->mb->voi_meta[voi_id].name, tpl->mb->tplhash); + } + tpl->mb->tplhash = hash32_buf(tpl->sb, tpl->sb->cursz, + tpl->mb->tplhash); +} + +static inline uint64_t +stats_pow_u64(uint64_t base, uint64_t exp) +{ + uint64_t result = 1; + + while (exp) { + if (exp & 1) + result *= base; + exp >>= 1; + base *= base; + } + + return (result); +} + +static inline int +stats_vss_hist_bkt_hlpr(struct vss_hist_hlpr_info *info, uint32_t curbkt, + struct voistatdata_numeric *bkt_lb, struct voistatdata_numeric *bkt_ub) +{ + uint64_t step = 0; + int error = 0; + + switch (info->scheme) { + case BKT_LIN: + step = info->lin.stepinc; + break; + case BKT_EXP: + step = stats_pow_u64(info->exp.stepbase, + info->exp.stepexp + curbkt); + break; + case BKT_LINEXP: + { + uint64_t curstepexp = 1; + + switch (info->voi_dtype) { + case VSD_DTYPE_INT_S32: + while ((int32_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= bkt_lb->int32.s32) + curstepexp++; + break; + case VSD_DTYPE_INT_U32: + while ((uint32_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= bkt_lb->int32.u32) + curstepexp++; + break; + case VSD_DTYPE_INT_S64: + while ((int64_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= bkt_lb->int64.s64) + curstepexp++; + break; + case VSD_DTYPE_INT_U64: + while ((uint64_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= bkt_lb->int64.u64) + curstepexp++; + break; + case VSD_DTYPE_INT_SLONG: + while ((long)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= bkt_lb->intlong.slong) + curstepexp++; + break; + case VSD_DTYPE_INT_ULONG: + while ((unsigned long)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= bkt_lb->intlong.ulong) + curstepexp++; + break; + case VSD_DTYPE_Q_S32: + while ((s32q_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= Q_GIVAL(bkt_lb->q32.sq32)) + break; + case VSD_DTYPE_Q_U32: + while ((u32q_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= Q_GIVAL(bkt_lb->q32.uq32)) + break; + case VSD_DTYPE_Q_S64: + while ((s64q_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= Q_GIVAL(bkt_lb->q64.sq64)) + curstepexp++; + break; + case VSD_DTYPE_Q_U64: + while ((u64q_t)stats_pow_u64(info->linexp.stepbase, + curstepexp) <= Q_GIVAL(bkt_lb->q64.uq64)) + curstepexp++; + break; + default: + break; + } + + step = stats_pow_u64(info->linexp.stepbase, curstepexp) / + info->linexp.linstepdiv; + if (step == 0) + step = 1; + break; + } + default: + break; + } + + if (info->scheme == BKT_USR) { + *bkt_lb = info->usr.bkts[curbkt].lb; + *bkt_ub = info->usr.bkts[curbkt].ub; + } else if (step != 0) { + switch (info->voi_dtype) { + case VSD_DTYPE_INT_S32: + bkt_ub->int32.s32 += (int32_t)step; + break; + case VSD_DTYPE_INT_U32: + bkt_ub->int32.u32 += (uint32_t)step; + break; + case VSD_DTYPE_INT_S64: + bkt_ub->int64.s64 += (int64_t)step; + break; + case VSD_DTYPE_INT_U64: + bkt_ub->int64.u64 += (uint64_t)step; + break; + case VSD_DTYPE_INT_SLONG: + bkt_ub->intlong.slong += (long)step; + break; + case VSD_DTYPE_INT_ULONG: + bkt_ub->intlong.ulong += (unsigned long)step; + break; + case VSD_DTYPE_Q_S32: + error = Q_QADDI(&bkt_ub->q32.sq32, step); + break; + case VSD_DTYPE_Q_U32: + error = Q_QADDI(&bkt_ub->q32.uq32, step); + break; + case VSD_DTYPE_Q_S64: + error = Q_QADDI(&bkt_ub->q64.sq64, step); + break; + case VSD_DTYPE_Q_U64: + error = Q_QADDI(&bkt_ub->q64.uq64, step); + break; + default: + break; + } + } else { /* info->scheme != BKT_USR && step == 0 */ + return (EINVAL); + } + + return (error); +} + +static uint32_t +stats_vss_hist_nbkts_hlpr(struct vss_hist_hlpr_info *info) +{ + struct voistatdata_numeric bkt_lb, bkt_ub; + uint32_t nbkts; + int done; + + if (info->scheme == BKT_USR) { + /* XXXLAS: Setting info->{lb,ub} from macro is tricky. */ + info->lb = info->usr.bkts[0].lb; + info->ub = info->usr.bkts[info->usr.nbkts - 1].lb; + } + + nbkts = 0; + done = 0; + bkt_ub = info->lb; + + do { + bkt_lb = bkt_ub; + if (stats_vss_hist_bkt_hlpr(info, nbkts++, &bkt_lb, &bkt_ub)) + return (0); + + if (info->scheme == BKT_USR) + done = (nbkts == info->usr.nbkts); + else { + switch (info->voi_dtype) { + case VSD_DTYPE_INT_S32: + done = (bkt_ub.int32.s32 > info->ub.int32.s32); + break; + case VSD_DTYPE_INT_U32: + done = (bkt_ub.int32.u32 > info->ub.int32.u32); + break; + case VSD_DTYPE_INT_S64: + done = (bkt_ub.int64.s64 > info->ub.int64.s64); + break; + case VSD_DTYPE_INT_U64: + done = (bkt_ub.int64.u64 > info->ub.int64.u64); + break; + case VSD_DTYPE_INT_SLONG: + done = (bkt_ub.intlong.slong > + info->ub.intlong.slong); + break; + case VSD_DTYPE_INT_ULONG: + done = (bkt_ub.intlong.ulong > + info->ub.intlong.ulong); + break; + case VSD_DTYPE_Q_S32: + done = Q_QGTQ(bkt_ub.q32.sq32, + info->ub.q32.sq32); + break; + case VSD_DTYPE_Q_U32: + done = Q_QGTQ(bkt_ub.q32.uq32, + info->ub.q32.uq32); + break; + case VSD_DTYPE_Q_S64: + done = Q_QGTQ(bkt_ub.q64.sq64, + info->ub.q64.sq64); + break; + case VSD_DTYPE_Q_U64: + done = Q_QGTQ(bkt_ub.q64.uq64, + info->ub.q64.uq64); + break; + default: + return (0); + } + } + } while (!done); + + if (info->flags & VSD_HIST_LBOUND_INF) + nbkts++; + if (info->flags & VSD_HIST_UBOUND_INF) + nbkts++; + + return (nbkts); +} + +int +stats_vss_hist_hlpr(enum vsd_dtype voi_dtype, struct voistatspec *vss, + struct vss_hist_hlpr_info *info) +{ + struct voistatdata_hist *hist; + struct voistatdata_numeric bkt_lb, bkt_ub, *lbinfbktlb, *lbinfbktub, + *ubinfbktlb, *ubinfbktub; + uint32_t bkt, nbkts, nloop; + + if (vss == NULL || info == NULL || (info->flags & + (VSD_HIST_LBOUND_INF|VSD_HIST_UBOUND_INF) && (info->hist_dtype == + VSD_DTYPE_DVHIST32 || info->hist_dtype == VSD_DTYPE_DVHIST64))) + return (EINVAL); + + info->voi_dtype = voi_dtype; + + if ((nbkts = stats_vss_hist_nbkts_hlpr(info)) == 0) + return (EINVAL); + + switch (info->hist_dtype) { + case VSD_DTYPE_CRHIST32: + vss->vsdsz = HIST_NBKTS2VSDSZ(crhist32, nbkts); + break; + case VSD_DTYPE_DRHIST32: + vss->vsdsz = HIST_NBKTS2VSDSZ(drhist32, nbkts); + break; + case VSD_DTYPE_DVHIST32: + vss->vsdsz = HIST_NBKTS2VSDSZ(dvhist32, nbkts); + break; + case VSD_DTYPE_CRHIST64: + vss->vsdsz = HIST_NBKTS2VSDSZ(crhist64, nbkts); + break; + case VSD_DTYPE_DRHIST64: + vss->vsdsz = HIST_NBKTS2VSDSZ(drhist64, nbkts); + break; + case VSD_DTYPE_DVHIST64: + vss->vsdsz = HIST_NBKTS2VSDSZ(dvhist64, nbkts); + break; + default: + return (EINVAL); + } + + vss->iv = stats_realloc(NULL, 0, vss->vsdsz, M_ZERO); + if (vss->iv == NULL) + return (ENOMEM); + + hist = (struct voistatdata_hist *)vss->iv; + bkt_ub = info->lb; + + for (bkt = (info->flags & VSD_HIST_LBOUND_INF), nloop = 0; + bkt < nbkts; + bkt++, nloop++) { + bkt_lb = bkt_ub; + if (stats_vss_hist_bkt_hlpr(info, nloop, &bkt_lb, &bkt_ub)) + return (EINVAL); + + switch (info->hist_dtype) { + case VSD_DTYPE_CRHIST32: + VSD(crhist32, hist)->bkts[bkt].lb = bkt_lb; + break; + case VSD_DTYPE_DRHIST32: + VSD(drhist32, hist)->bkts[bkt].lb = bkt_lb; + VSD(drhist32, hist)->bkts[bkt].ub = bkt_ub; + break; + case VSD_DTYPE_DVHIST32: + VSD(dvhist32, hist)->bkts[bkt].val = bkt_lb; + break; + case VSD_DTYPE_CRHIST64: + VSD(crhist64, hist)->bkts[bkt].lb = bkt_lb; + break; + case VSD_DTYPE_DRHIST64: + VSD(drhist64, hist)->bkts[bkt].lb = bkt_lb; + VSD(drhist64, hist)->bkts[bkt].ub = bkt_ub; + break; + case VSD_DTYPE_DVHIST64: + VSD(dvhist64, hist)->bkts[bkt].val = bkt_lb; + break; + default: + return (EINVAL); + } + } + + lbinfbktlb = lbinfbktub = ubinfbktlb = ubinfbktub = NULL; + + switch (info->hist_dtype) { + case VSD_DTYPE_CRHIST32: + lbinfbktlb = &VSD(crhist32, hist)->bkts[0].lb; + ubinfbktlb = &VSD(crhist32, hist)->bkts[nbkts - 1].lb; + break; + case VSD_DTYPE_DRHIST32: + lbinfbktlb = &VSD(drhist32, hist)->bkts[0].lb; + lbinfbktub = &VSD(drhist32, hist)->bkts[0].ub; + ubinfbktlb = &VSD(drhist32, hist)->bkts[nbkts - 1].lb; + ubinfbktub = &VSD(drhist32, hist)->bkts[nbkts - 1].ub; + break; + case VSD_DTYPE_CRHIST64: + lbinfbktlb = &VSD(crhist64, hist)->bkts[0].lb; + ubinfbktlb = &VSD(crhist64, hist)->bkts[nbkts - 1].lb; + break; + case VSD_DTYPE_DRHIST64: + lbinfbktlb = &VSD(drhist64, hist)->bkts[0].lb; + lbinfbktub = &VSD(drhist64, hist)->bkts[0].ub; + ubinfbktlb = &VSD(drhist64, hist)->bkts[nbkts - 1].lb; + ubinfbktub = &VSD(drhist64, hist)->bkts[nbkts - 1].ub; + break; + case VSD_DTYPE_DVHIST32: + case VSD_DTYPE_DVHIST64: + break; + default: + return (EINVAL); + } + + if ((info->flags & VSD_HIST_LBOUND_INF) && lbinfbktlb) { + *lbinfbktlb = numeric_limits[LIM_MIN][info->voi_dtype]; + /* + * Assignment from numeric_limit array for Q types assigns max + * possible integral/fractional value for underlying data type, + * but we must set control bits for this specific histogram per + * the user's choice of fractional bits, which we extract from + * info->lb. + */ + if (info->voi_dtype == VSD_DTYPE_Q_S32 || + info->voi_dtype == VSD_DTYPE_Q_U32) { + /* Signedness doesn't matter for setting control bits. */ + Q_SCVAL(lbinfbktlb->q32.sq32, + Q_GCVAL(info->lb.q32.sq32)); + } else if (info->voi_dtype == VSD_DTYPE_Q_S64 || + info->voi_dtype == VSD_DTYPE_Q_U64) { + /* Signedness doesn't matter for setting control bits. */ + Q_SCVAL(lbinfbktlb->q64.sq64, + Q_GCVAL(info->lb.q64.sq64)); + } + if (lbinfbktub) + *lbinfbktub = info->lb; + } + if ((info->flags & VSD_HIST_UBOUND_INF) && ubinfbktlb) { + *ubinfbktlb = bkt_lb; + if (ubinfbktub) { + *ubinfbktub = numeric_limits[LIM_MAX][info->voi_dtype]; + if (info->voi_dtype == VSD_DTYPE_Q_S32 || + info->voi_dtype == VSD_DTYPE_Q_U32) { + Q_SCVAL(ubinfbktub->q32.sq32, + Q_GCVAL(info->lb.q32.sq32)); + } else if (info->voi_dtype == VSD_DTYPE_Q_S64 || + info->voi_dtype == VSD_DTYPE_Q_U64) { + Q_SCVAL(ubinfbktub->q64.sq64, + Q_GCVAL(info->lb.q64.sq64)); + } + } + } + + return (0); +} + +int +stats_vss_tdgst_hlpr(enum vsd_dtype voi_dtype, struct voistatspec *vss, + struct vss_tdgst_hlpr_info *info) +{ + struct voistatdata_tdgst *tdgst; + struct ctdth32 *ctd32tree; + struct ctdth64 *ctd64tree; + struct voistatdata_tdgstctd32 *ctd32; + struct voistatdata_tdgstctd64 *ctd64; + + info->voi_dtype = voi_dtype; + + switch (info->tdgst_dtype) { + case VSD_DTYPE_TDGSTCLUST32: + vss->vsdsz = TDGST_NCTRS2VSDSZ(tdgstclust32, info->nctds); + break; + case VSD_DTYPE_TDGSTCLUST64: + vss->vsdsz = TDGST_NCTRS2VSDSZ(tdgstclust64, info->nctds); + break; + default: + return (EINVAL); + } + + vss->iv = stats_realloc(NULL, 0, vss->vsdsz, M_ZERO); + if (vss->iv == NULL) + return (ENOMEM); + + tdgst = (struct voistatdata_tdgst *)vss->iv; + + switch (info->tdgst_dtype) { + case VSD_DTYPE_TDGSTCLUST32: + ctd32tree = &VSD(tdgstclust32, tdgst)->ctdtree; + ARB_INIT(ctd32, ctdlnk, ctd32tree, info->nctds) { + Q_INI(&ctd32->mu, 0, 0, info->prec); + } + break; + case VSD_DTYPE_TDGSTCLUST64: + ctd64tree = &VSD(tdgstclust64, tdgst)->ctdtree; + ARB_INIT(ctd64, ctdlnk, ctd64tree, info->nctds) { + Q_INI(&ctd64->mu, 0, 0, info->prec); + } + break; + default: + return (EINVAL); + } + + return (0); +} + +int +stats_vss_numeric_hlpr(enum vsd_dtype voi_dtype, struct voistatspec *vss, + struct vss_numeric_hlpr_info *info) +{ + struct voistatdata_numeric iv; + + switch (vss->stype) { + case VS_STYPE_SUM: + iv = stats_ctor_vsd_numeric(0); + break; + case VS_STYPE_MIN: + iv = numeric_limits[LIM_MAX][voi_dtype]; + break; + case VS_STYPE_MAX: + iv = numeric_limits[LIM_MIN][voi_dtype]; + break; + default: + return (EINVAL); + } + + vss->iv = stats_realloc(NULL, 0, vsd_dtype2size[voi_dtype], 0); + if (vss->iv == NULL) + return (ENOMEM); + + vss->vs_dtype = voi_dtype; + vss->vsdsz = vsd_dtype2size[voi_dtype]; + switch (voi_dtype) { + case VSD_DTYPE_INT_S32: + *((int32_t *)vss->iv) = iv.int32.s32; + break; + case VSD_DTYPE_INT_U32: + *((uint32_t *)vss->iv) = iv.int32.u32; + break; + case VSD_DTYPE_INT_S64: + *((int64_t *)vss->iv) = iv.int64.s64; + break; + case VSD_DTYPE_INT_U64: + *((uint64_t *)vss->iv) = iv.int64.u64; + break; + case VSD_DTYPE_INT_SLONG: + *((long *)vss->iv) = iv.intlong.slong; + break; + case VSD_DTYPE_INT_ULONG: + *((unsigned long *)vss->iv) = iv.intlong.ulong; + break; + case VSD_DTYPE_Q_S32: + *((s32q_t *)vss->iv) = Q_SCVAL(iv.q32.sq32, + Q_CTRLINI(info->prec)); + break; + case VSD_DTYPE_Q_U32: + *((u32q_t *)vss->iv) = Q_SCVAL(iv.q32.uq32, + Q_CTRLINI(info->prec)); + break; + case VSD_DTYPE_Q_S64: + *((s64q_t *)vss->iv) = Q_SCVAL(iv.q64.sq64, + Q_CTRLINI(info->prec)); + break; + case VSD_DTYPE_Q_U64: + *((u64q_t *)vss->iv) = Q_SCVAL(iv.q64.uq64, + Q_CTRLINI(info->prec)); + break; + default: + break; + } + + return (0); +} + +int +stats_vss_hlpr_init(enum vsd_dtype voi_dtype, uint32_t nvss, + struct voistatspec *vss) +{ + int i, ret; + + for (i = nvss - 1; i >= 0; i--) { + if (vss[i].hlpr && (ret = vss[i].hlpr(voi_dtype, &vss[i], + vss[i].hlprinfo)) != 0) + return (ret); + } + + return (0); +} + +void +stats_vss_hlpr_cleanup(uint32_t nvss, struct voistatspec *vss) +{ + int i; + + for (i = nvss - 1; i >= 0; i--) { + if (vss[i].hlpr) { + stats_free((void *)vss[i].iv); + vss[i].iv = NULL; + } + } +} + +int +stats_tpl_fetch(int tpl_id, struct statsblob_tpl **tpl) +{ + int error; + + error = 0; + + TPL_LIST_WLOCK(); + if (tpl_id < 0 || tpl_id >= (int)ntpl) { + error = ENOENT; + } else { + *tpl = tpllist[tpl_id]; + /* XXXLAS: Acquire refcount on tpl. */ + } + TPL_LIST_WUNLOCK(); + + return (error); +} + +int +stats_tpl_fetch_allocid(const char *name, uint32_t hash) +{ + int i, tpl_id; + + tpl_id = -ESRCH; + + TPL_LIST_RLOCK(); + for (i = ntpl - 1; i >= 0; i--) { + if (name != NULL) { + if (strlen(name) == strlen(tpllist[i]->mb->tplname) && + strncmp(name, tpllist[i]->mb->tplname, + TPL_MAX_NAME_LEN) == 0 && (!hash || hash == + tpllist[i]->mb->tplhash)) { + tpl_id = i; + break; + } + } else if (hash == tpllist[i]->mb->tplhash) { + tpl_id = i; + break; + } + } + TPL_LIST_RUNLOCK(); + + return (tpl_id); +} + +int +stats_tpl_id2name(uint32_t tpl_id, char *buf, size_t len) +{ + int error; + + error = 0; + + TPL_LIST_RLOCK(); + if (tpl_id < ntpl) { + if (buf != NULL && len > strlen(tpllist[tpl_id]->mb->tplname)) + strlcpy(buf, tpllist[tpl_id]->mb->tplname, len); + else + error = EOVERFLOW; + } else + error = ENOENT; + TPL_LIST_RUNLOCK(); + + return (error); +} + +int +stats_tpl_sample_rollthedice(struct stats_tpl_sample_rate *rates, int nrates, + void *seed_bytes, size_t seed_len) +{ + uint32_t cum_pct, rnd_pct; + int i; + + cum_pct = 0; + + /* + * Choose a pseudorandom or seeded number in range [0,100] and use + * it to make a sampling decision and template selection where required. + * If no seed is supplied, a PRNG is used to generate a pseudorandom + * number so that every selection is independent. If a seed is supplied, + * the caller desires random selection across different seeds, but + * deterministic selection given the same seed. This is achieved by + * hashing the seed and using the hash as the random number source. + * + * XXXLAS: Characterise hash function output distribution. + */ + if (seed_bytes == NULL) + rnd_pct = random() / (INT32_MAX / 100); + else + rnd_pct = hash32_buf(seed_bytes, seed_len, 0) / + (UINT32_MAX / 100U); + + /* + * We map the randomly selected percentage on to the interval [0,100] + * consisting of the cumulatively summed template sampling percentages. + * The difference between the cumulative sum of all template sampling + * percentages and 100 is treated as a NULL assignment i.e. no stats + * template will be assigned, and -1 returned instead. + */ + for (i = 0; i < nrates; i++) { + cum_pct += rates[i].tpl_sample_pct; + + KASSERT(cum_pct <= 100, ("%s cum_pct %u > 100", __func__, + cum_pct)); + if (rnd_pct > cum_pct || rates[i].tpl_sample_pct == 0) + continue; + + return (rates[i].tpl_slot_id); + } + + return (-1); +} + +int +stats_v1_blob_clone(struct statsblobv1 **dst, size_t dstmaxsz, + struct statsblobv1 *src, uint32_t flags) +{ + int error; + + error = 0; + + if (src == NULL || dst == NULL || + src->cursz < sizeof(struct statsblob) || + ((flags & SB_CLONE_ALLOCDST) && + (flags & (SB_CLONE_USRDSTNOFAULT | SB_CLONE_USRDST)))) { + error = EINVAL; + } else if (flags & SB_CLONE_ALLOCDST) { + *dst = stats_realloc(NULL, 0, src->cursz, 0); + if (*dst) + (*dst)->maxsz = dstmaxsz = src->cursz; + else + error = ENOMEM; + } else if (*dst == NULL || dstmaxsz < sizeof(struct statsblob)) { + error = EINVAL; + } + + if (!error) { + size_t postcurszlen; + + /* + * Clone src into dst except for the maxsz field. If dst is too + * small to hold all of src, only copy src's header and return + * EOVERFLOW. + */ +#ifdef _KERNEL + if (flags & SB_CLONE_USRDSTNOFAULT) + copyout_nofault(src, *dst, + offsetof(struct statsblob, maxsz)); + else if (flags & SB_CLONE_USRDST) + copyout(src, *dst, offsetof(struct statsblob, maxsz)); + else +#endif + memcpy(*dst, src, offsetof(struct statsblob, maxsz)); + + if (dstmaxsz >= src->cursz) { + postcurszlen = src->cursz - + offsetof(struct statsblob, cursz); + } else { + error = EOVERFLOW; + postcurszlen = sizeof(struct statsblob) - + offsetof(struct statsblob, cursz); + } +#ifdef _KERNEL + if (flags & SB_CLONE_USRDSTNOFAULT) + copyout_nofault(&(src->cursz), &((*dst)->cursz), + postcurszlen); + else if (flags & SB_CLONE_USRDST) + copyout(&(src->cursz), &((*dst)->cursz), postcurszlen); + else +#endif + memcpy(&((*dst)->cursz), &(src->cursz), postcurszlen); + } + + return (error); +} + +int +stats_v1_tpl_alloc(const char *name, uint32_t flags __unused) +{ + struct statsblobv1_tpl *tpl, **newtpllist; + struct statsblobv1 *tpl_sb; + struct metablob *tpl_mb; + int tpl_id; + + if (name != NULL && strlen(name) > TPL_MAX_NAME_LEN) + return (-EINVAL); + + if (name != NULL && stats_tpl_fetch_allocid(name, 0) >= 0) + return (-EEXIST); + + tpl = stats_realloc(NULL, 0, sizeof(struct statsblobv1_tpl), M_ZERO); + tpl_mb = stats_realloc(NULL, 0, sizeof(struct metablob), M_ZERO); + tpl_sb = stats_realloc(NULL, 0, sizeof(struct statsblobv1), M_ZERO); + + if (tpl_mb != NULL && name != NULL) + tpl_mb->tplname = stats_strdup(name, 0); + + if (tpl == NULL || tpl_sb == NULL || tpl_mb == NULL || + tpl_mb->tplname == NULL) { + stats_free(tpl); + stats_free(tpl_sb); + if (tpl_mb != NULL) { + stats_free(tpl_mb->tplname); + stats_free(tpl_mb); + } + return (-ENOMEM); + } + + tpl->mb = tpl_mb; + tpl->sb = tpl_sb; + + tpl_sb->abi = STATS_ABI_V1; + tpl_sb->endian = +#if BYTE_ORDER == LITTLE_ENDIAN + SB_LE; +#elif BYTE_ORDER == BIG_ENDIAN + SB_BE; +#else + SB_UE; +#endif + tpl_sb->cursz = tpl_sb->maxsz = sizeof(struct statsblobv1); + tpl_sb->stats_off = tpl_sb->statsdata_off = sizeof(struct statsblobv1); + + TPL_LIST_WLOCK(); + newtpllist = stats_realloc(tpllist, ntpl * sizeof(void *), + (ntpl + 1) * sizeof(void *), 0); + if (newtpllist != NULL) { + tpl_id = ntpl++; + tpllist = (struct statsblob_tpl **)newtpllist; + tpllist[tpl_id] = (struct statsblob_tpl *)tpl; + stats_tpl_update_hash(tpllist[tpl_id]); + } else { + stats_free(tpl); + stats_free(tpl_sb); + if (tpl_mb != NULL) { + stats_free(tpl_mb->tplname); + stats_free(tpl_mb); + } + tpl_id = -ENOMEM; + } + TPL_LIST_WUNLOCK(); + + return (tpl_id); +} + +int +stats_v1_tpl_add_voistats(uint32_t tpl_id, int32_t voi_id, const char *voi_name, + enum vsd_dtype voi_dtype, uint32_t nvss, struct voistatspec *vss, + uint32_t flags) +{ + struct voi *voi; + struct voistat *tmpstat; + struct statsblobv1 *tpl_sb; + struct metablob *tpl_mb; + int error, i, newstatdataidx, newvoibytes, newvoistatbytes, + newvoistatdatabytes, newvoistatmaxid; + uint32_t nbytes; + + if (voi_id < 0 || voi_dtype == 0 || voi_dtype >= VSD_NUM_DTYPES || + nvss == 0 || vss == NULL) + return (EINVAL); + + error = nbytes = newvoibytes = newvoistatbytes = + newvoistatdatabytes = 0; + newvoistatmaxid = -1; + + /* Calculate the number of bytes required for the new voistats. */ + for (i = nvss - 1; i >= 0; i--) { + if (vss[i].stype == 0 || vss[i].stype >= VS_NUM_STYPES || + vss[i].vs_dtype == 0 || vss[i].vs_dtype >= VSD_NUM_DTYPES || + vss[i].iv == NULL || vss[i].vsdsz == 0) + return (EINVAL); + if ((int)vss[i].stype > newvoistatmaxid) + newvoistatmaxid = vss[i].stype; + newvoistatdatabytes += vss[i].vsdsz; + } + + if (flags & SB_VOI_RELUPDATE) { + /* XXXLAS: VOI state bytes may need to vary based on stat types. */ + newvoistatdatabytes += sizeof(struct voistatdata_voistate); + } + nbytes += newvoistatdatabytes; + + TPL_LIST_WLOCK(); + if (tpl_id < ntpl) { + tpl_sb = (struct statsblobv1 *)tpllist[tpl_id]->sb; + tpl_mb = tpllist[tpl_id]->mb; + + if (voi_id >= NVOIS(tpl_sb) || tpl_sb->vois[voi_id].id == -1) { + /* Adding a new VOI and associated stats. */ + if (voi_id >= NVOIS(tpl_sb)) { + /* We need to grow the tpl_sb->vois array. */ + newvoibytes = (voi_id - (NVOIS(tpl_sb) - 1)) * + sizeof(struct voi); + nbytes += newvoibytes; + } + newvoistatbytes = + (newvoistatmaxid + 1) * sizeof(struct voistat); + } else { + /* Adding stats to an existing VOI. */ + if (newvoistatmaxid > + tpl_sb->vois[voi_id].voistatmaxid) { + newvoistatbytes = (newvoistatmaxid - + tpl_sb->vois[voi_id].voistatmaxid) * + sizeof(struct voistat); + } + /* XXXLAS: KPI does not yet support expanding VOIs. */ + error = EOPNOTSUPP; + } + nbytes += newvoistatbytes; + + if (!error && newvoibytes > 0) { + struct voi_meta *voi_meta = tpl_mb->voi_meta; + + voi_meta = stats_realloc(voi_meta, voi_meta == NULL ? + 0 : NVOIS(tpl_sb) * sizeof(struct voi_meta), + (1 + voi_id) * sizeof(struct voi_meta), + M_ZERO); + + if (voi_meta == NULL) + error = ENOMEM; + else + tpl_mb->voi_meta = voi_meta; + } + + if (!error) { + /* NB: Resizing can change where tpl_sb points. */ + error = stats_v1_blob_expand(&tpl_sb, newvoibytes, + newvoistatbytes, newvoistatdatabytes); + } + + if (!error) { + tpl_mb->voi_meta[voi_id].name = stats_strdup(voi_name, + 0); + if (tpl_mb->voi_meta[voi_id].name == NULL) + error = ENOMEM; + } + + if (!error) { + /* Update the template list with the resized pointer. */ + tpllist[tpl_id]->sb = (struct statsblob *)tpl_sb; + + /* Update the template. */ + voi = &tpl_sb->vois[voi_id]; + + if (voi->id < 0) { + /* VOI is new and needs to be initialised. */ + voi->id = voi_id; + voi->dtype = voi_dtype; + voi->stats_off = tpl_sb->stats_off; + if (flags & SB_VOI_RELUPDATE) + voi->flags |= VOI_REQSTATE; + } else { + /* + * XXXLAS: When this else block is written, the + * "KPI does not yet support expanding VOIs" + * error earlier in this function can be + * removed. What is required here is to shuffle + * the voistat array such that the new stats for + * the voi are contiguous, which will displace + * stats for other vois that reside after the + * voi being updated. The other vois then need + * to have their stats_off adjusted post + * shuffle. + */ + } + + voi->voistatmaxid = newvoistatmaxid; + newstatdataidx = 0; + + if (voi->flags & VOI_REQSTATE) { + /* Initialise the voistate stat in slot 0. */ + tmpstat = BLOB_OFFSET(tpl_sb, voi->stats_off); + tmpstat->stype = VS_STYPE_VOISTATE; + tmpstat->flags = 0; + tmpstat->dtype = VSD_DTYPE_VOISTATE; + newstatdataidx = tmpstat->dsz = + sizeof(struct voistatdata_numeric); + tmpstat->data_off = tpl_sb->statsdata_off; + } + + for (i = 0; (uint32_t)i < nvss; i++) { + tmpstat = BLOB_OFFSET(tpl_sb, voi->stats_off + + (vss[i].stype * sizeof(struct voistat))); + KASSERT(tmpstat->stype < 0, ("voistat %p " + "already initialised", tmpstat)); + tmpstat->stype = vss[i].stype; + tmpstat->flags = vss[i].flags; + tmpstat->dtype = vss[i].vs_dtype; + tmpstat->dsz = vss[i].vsdsz; + tmpstat->data_off = tpl_sb->statsdata_off + + newstatdataidx; + memcpy(BLOB_OFFSET(tpl_sb, tmpstat->data_off), + vss[i].iv, vss[i].vsdsz); + newstatdataidx += vss[i].vsdsz; + } + + /* Update the template version hash. */ + stats_tpl_update_hash(tpllist[tpl_id]); + /* XXXLAS: Confirm tpl name/hash pair remains unique. */ + } + } else + error = EINVAL; + TPL_LIST_WUNLOCK(); + + return (error); +} + +struct statsblobv1 * +stats_v1_blob_alloc(uint32_t tpl_id, uint32_t flags __unused) +{ + struct statsblobv1 *sb; + int error; + + sb = NULL; + + TPL_LIST_RLOCK(); + if (tpl_id < ntpl) { + sb = stats_realloc(NULL, 0, tpllist[tpl_id]->sb->maxsz, 0); + if (sb != NULL) { + sb->maxsz = tpllist[tpl_id]->sb->maxsz; + error = stats_v1_blob_init_locked(sb, tpl_id, 0); + } else + error = ENOMEM; + + if (error) { + stats_free(sb); + sb = NULL; + } + } + TPL_LIST_RUNLOCK(); + + return (sb); +} + +void +stats_v1_blob_destroy(struct statsblobv1 *sb) +{ + + stats_free(sb); +} + +int +stats_v1_voistat_fetch_dptr(struct statsblobv1 *sb, int32_t voi_id, + enum voi_stype stype, enum vsd_dtype *retdtype, struct voistatdata **retvsd, + size_t *retvsdsz) +{ + struct voi *v; + struct voistat *vs; + + if (retvsd == NULL || sb == NULL || sb->abi != STATS_ABI_V1 || + voi_id >= NVOIS(sb)) + return (EINVAL); + + v = &sb->vois[voi_id]; + if ((__typeof(v->voistatmaxid))stype > v->voistatmaxid) + return (EINVAL); + + vs = BLOB_OFFSET(sb, v->stats_off + (stype * sizeof(struct voistat))); + *retvsd = BLOB_OFFSET(sb, vs->data_off); + if (retdtype != NULL) + *retdtype = vs->dtype; + if (retvsdsz != NULL) + *retvsdsz = vs->dsz; + + return (0); +} + +int +stats_v1_blob_init(struct statsblobv1 *sb, uint32_t tpl_id, uint32_t flags) +{ + int error; + + error = 0; + + TPL_LIST_RLOCK(); + if (sb == NULL || tpl_id >= ntpl) { + error = EINVAL; + } else { + error = stats_v1_blob_init_locked(sb, tpl_id, flags); + } + TPL_LIST_RUNLOCK(); + + return (error); +} + +static inline int +stats_v1_blob_init_locked(struct statsblobv1 *sb, uint32_t tpl_id, + uint32_t flags __unused) +{ + int error; + + TPL_LIST_RLOCK_ASSERT(); + error = (sb->maxsz >= tpllist[tpl_id]->sb->cursz) ? 0 : EOVERFLOW; + KASSERT(!error, + ("sb %d instead of %d bytes", sb->maxsz, tpllist[tpl_id]->sb->cursz)); + + if (!error) { + memcpy(sb, tpllist[tpl_id]->sb, tpllist[tpl_id]->sb->cursz); + sb->created = sb->lastrst = stats_sbinuptime(); + sb->tplhash = tpllist[tpl_id]->mb->tplhash; + } + + return (error); +} + +static int +stats_v1_blob_expand(struct statsblobv1 **sbpp, int newvoibytes, + int newvoistatbytes, int newvoistatdatabytes) +{ + struct statsblobv1 *sb; + struct voi *tmpvoi; + struct voistat *tmpvoistat, *voistat_array; + int error, i, idxnewvois, idxnewvoistats, nbytes, nvoistats; + + KASSERT(newvoibytes % sizeof(struct voi) == 0, + ("Bad newvoibytes %d", newvoibytes)); + KASSERT(newvoistatbytes % sizeof(struct voistat) == 0, + ("Bad newvoistatbytes %d", newvoistatbytes)); + + error = ((newvoibytes % sizeof(struct voi) == 0) && + (newvoistatbytes % sizeof(struct voistat) == 0)) ? 0 : EINVAL; + sb = *sbpp; + nbytes = newvoibytes + newvoistatbytes + newvoistatdatabytes; + + /* + * XXXLAS: Required until we gain support for flags which alter the + * units of size/offset fields in key structs. + */ + if (!error && ((((int)sb->cursz) + nbytes) > SB_V1_MAXSZ)) + error = EFBIG; + + if (!error && (sb->cursz + nbytes > sb->maxsz)) { + /* Need to expand our blob. */ + sb = stats_realloc(sb, sb->maxsz, sb->cursz + nbytes, M_ZERO); + if (sb != NULL) { + sb->maxsz = sb->cursz + nbytes; + *sbpp = sb; + } else + error = ENOMEM; + } + + if (!error) { + /* + * Shuffle memory within the expanded blob working from the end + * backwards, leaving gaps for the new voistat and voistatdata + * structs at the beginning of their respective blob regions, + * and for the new voi structs at the end of their blob region. + */ + memmove(BLOB_OFFSET(sb, sb->statsdata_off + nbytes), + BLOB_OFFSET(sb, sb->statsdata_off), + sb->cursz - sb->statsdata_off); + memmove(BLOB_OFFSET(sb, sb->stats_off + newvoibytes + + newvoistatbytes), BLOB_OFFSET(sb, sb->stats_off), + sb->statsdata_off - sb->stats_off); + + /* First index of new voi/voistat structs to be initialised. */ + idxnewvois = NVOIS(sb); + idxnewvoistats = (newvoistatbytes / sizeof(struct voistat)) - 1; + + /* Update housekeeping variables and offsets. */ + sb->cursz += nbytes; + sb->stats_off += newvoibytes; + sb->statsdata_off += newvoibytes + newvoistatbytes; + + /* XXXLAS: Zeroing not strictly needed but aids debugging. */ + memset(&sb->vois[idxnewvois], '\0', newvoibytes); + memset(BLOB_OFFSET(sb, sb->stats_off), '\0', + newvoistatbytes); + memset(BLOB_OFFSET(sb, sb->statsdata_off), '\0', + newvoistatdatabytes); + + /* Initialise new voi array members and update offsets. */ + for (i = 0; i < NVOIS(sb); i++) { + tmpvoi = &sb->vois[i]; + if (i >= idxnewvois) { + tmpvoi->id = tmpvoi->voistatmaxid = -1; + } else if (tmpvoi->id > -1) { + tmpvoi->stats_off += newvoibytes + + newvoistatbytes; + } + } + + /* Initialise new voistat array members and update offsets. */ + nvoistats = (sb->statsdata_off - sb->stats_off) / + sizeof(struct voistat); + voistat_array = BLOB_OFFSET(sb, sb->stats_off); + for (i = 0; i < nvoistats; i++) { + tmpvoistat = &voistat_array[i]; + if (i <= idxnewvoistats) { + tmpvoistat->stype = -1; + } else if (tmpvoistat->stype > -1) { + tmpvoistat->data_off += nbytes; + } + } + } + + return (error); +} + +static void +stats_v1_blob_finalise(struct statsblobv1 *sb __unused) +{ + + /* XXXLAS: Fill this in. */ +} + +static void +stats_v1_blob_iter(struct statsblobv1 *sb, stats_v1_blob_itercb_t icb, + void *usrctx, uint32_t flags) +{ + struct voi *v; + struct voistat *vs; + struct sb_iter_ctx ctx; + int i, j, firstvoi; + + ctx.usrctx = usrctx; + ctx.flags |= SB_IT_FIRST_CB; + ctx.flags &= ~(SB_IT_FIRST_VOI | SB_IT_LAST_VOI | SB_IT_FIRST_VOISTAT | + SB_IT_LAST_VOISTAT); + firstvoi = 1; + + for (i = 0; i < NVOIS(sb); i++) { + v = &sb->vois[i]; + ctx.vslot = i; + ctx.vsslot = -1; + ctx.flags |= SB_IT_FIRST_VOISTAT; + + if (firstvoi) + ctx.flags |= SB_IT_FIRST_VOI; + else if (i == (NVOIS(sb) - 1)) + ctx.flags |= SB_IT_LAST_VOI | SB_IT_LAST_CB; + + if (v->id < 0 && (flags & SB_IT_NULLVOI)) { + if (icb(sb, v, NULL, &ctx)) + return; + firstvoi = 0; + ctx.flags &= ~SB_IT_FIRST_CB; + } + + /* If NULL voi, v->voistatmaxid == -1 */ + for (j = 0; j <= v->voistatmaxid; j++) { + vs = &((struct voistat *)BLOB_OFFSET(sb, + v->stats_off))[j]; + if (vs->stype < 0 && + !(flags & SB_IT_NULLVOISTAT)) + continue; + + if (j == v->voistatmaxid) { + ctx.flags |= SB_IT_LAST_VOISTAT; + if (i == (NVOIS(sb) - 1)) + ctx.flags |= + SB_IT_LAST_CB; + } else + ctx.flags &= ~SB_IT_LAST_CB; + + ctx.vsslot = j; + if (icb(sb, v, vs, &ctx)) + return; + + ctx.flags &= ~(SB_IT_FIRST_CB | SB_IT_FIRST_VOISTAT | + SB_IT_LAST_VOISTAT); + } + ctx.flags &= ~(SB_IT_FIRST_VOI | SB_IT_LAST_VOI); + } +} + +static inline void +stats_voistatdata_tdgst_tostr(enum vsd_dtype voi_dtype __unused, + const struct voistatdata_tdgst *tdgst, enum vsd_dtype tdgst_dtype, + size_t tdgst_dsz __unused, enum sb_str_fmt fmt, struct sbuf *buf, int objdump) +{ + const struct ctdth32 *ctd32tree; + const struct ctdth64 *ctd64tree; + const struct voistatdata_tdgstctd32 *ctd32; + const struct voistatdata_tdgstctd64 *ctd64; + const char *fmtstr; + uint64_t smplcnt, compcnt; + int is32bit, qmaxstrlen; + uint16_t maxctds, curctds; + + switch (tdgst_dtype) { + case VSD_DTYPE_TDGSTCLUST32: + smplcnt = CONSTVSD(tdgstclust32, tdgst)->smplcnt; + compcnt = CONSTVSD(tdgstclust32, tdgst)->compcnt; + maxctds = ARB_MAXNODES(&CONSTVSD(tdgstclust32, tdgst)->ctdtree); + curctds = ARB_CURNODES(&CONSTVSD(tdgstclust32, tdgst)->ctdtree); + ctd32tree = &CONSTVSD(tdgstclust32, tdgst)->ctdtree; + ctd32 = (objdump ? ARB_CNODE(ctd32tree, 0) : + ARB_CMIN(ctdth32, ctd32tree)); + qmaxstrlen = (ctd32 == NULL) ? 1 : Q_MAXSTRLEN(ctd32->mu, 10); + is32bit = 1; + ctd64tree = NULL; + ctd64 = NULL; + break; + case VSD_DTYPE_TDGSTCLUST64: + smplcnt = CONSTVSD(tdgstclust64, tdgst)->smplcnt; + compcnt = CONSTVSD(tdgstclust64, tdgst)->compcnt; + maxctds = ARB_MAXNODES(&CONSTVSD(tdgstclust64, tdgst)->ctdtree); + curctds = ARB_CURNODES(&CONSTVSD(tdgstclust64, tdgst)->ctdtree); + ctd64tree = &CONSTVSD(tdgstclust64, tdgst)->ctdtree; + ctd64 = (objdump ? ARB_CNODE(ctd64tree, 0) : + ARB_CMIN(ctdth64, ctd64tree)); + qmaxstrlen = (ctd64 == NULL) ? 1 : Q_MAXSTRLEN(ctd64->mu, 10); + is32bit = 0; + ctd32tree = NULL; + ctd32 = NULL; + break; + default: + return; + } + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "smplcnt=%ju, compcnt=%ju, maxctds=%hu, nctds=%hu"; + break; + case SB_STRFMT_JSON: + default: + fmtstr = + "\"smplcnt\":%ju,\"compcnt\":%ju,\"maxctds\":%hu," + "\"nctds\":%hu,\"ctds\":["; + break; + } + sbuf_printf(buf, fmtstr, (uintmax_t)smplcnt, (uintmax_t)compcnt, + maxctds, curctds); + + while ((is32bit ? NULL != ctd32 : NULL != ctd64)) { + char qstr[qmaxstrlen]; + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "\n\t\t\t\t"; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "{"; + break; + } + sbuf_cat(buf, fmtstr); + + if (objdump) { + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "ctd[%hu]."; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "\"ctd\":%hu,"; + break; + } + sbuf_printf(buf, fmtstr, is32bit ? + ARB_SELFIDX(ctd32tree, ctd32) : + ARB_SELFIDX(ctd64tree, ctd64)); + } + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "{mu="; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "\"mu\":"; + break; + } + sbuf_cat(buf, fmtstr); + Q_TOSTR((is32bit ? ctd32->mu : ctd64->mu), -1, 10, qstr, + sizeof(qstr)); + sbuf_cat(buf, qstr); + + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = is32bit ? ",cnt=%u}" : ",cnt=%ju}"; + break; + case SB_STRFMT_JSON: + default: + fmtstr = is32bit ? ",\"cnt\":%u}" : ",\"cnt\":%ju}"; + break; + } + sbuf_printf(buf, fmtstr, + is32bit ? ctd32->cnt : (uintmax_t)ctd64->cnt); + + if (is32bit) + ctd32 = (objdump ? ARB_CNODE(ctd32tree, + ARB_SELFIDX(ctd32tree, ctd32) + 1) : + ARB_CNEXT(ctdth32, ctd32tree, ctd32)); + else + ctd64 = (objdump ? ARB_CNODE(ctd64tree, + ARB_SELFIDX(ctd64tree, ctd64) + 1) : + ARB_CNEXT(ctdth64, ctd64tree, ctd64)); + + if (fmt == SB_STRFMT_JSON && + (is32bit ? NULL != ctd32 : NULL != ctd64)) + sbuf_putc(buf, ','); + } + if (fmt == SB_STRFMT_JSON) + sbuf_cat(buf, "]"); +} + +static inline void +stats_voistatdata_hist_tostr(enum vsd_dtype voi_dtype, + const struct voistatdata_hist *hist, enum vsd_dtype hist_dtype, + size_t hist_dsz, enum sb_str_fmt fmt, struct sbuf *buf, int objdump) +{ + const struct voistatdata_numeric *bkt_lb, *bkt_ub; + const char *fmtstr; + int is32bit; + uint16_t i, nbkts; + + switch (hist_dtype) { + case VSD_DTYPE_CRHIST32: + nbkts = HIST_VSDSZ2NBKTS(crhist32, hist_dsz); + is32bit = 1; + break; + case VSD_DTYPE_DRHIST32: + nbkts = HIST_VSDSZ2NBKTS(drhist32, hist_dsz); + is32bit = 1; + break; + case VSD_DTYPE_DVHIST32: + nbkts = HIST_VSDSZ2NBKTS(dvhist32, hist_dsz); + is32bit = 1; + break; + case VSD_DTYPE_CRHIST64: + nbkts = HIST_VSDSZ2NBKTS(crhist64, hist_dsz); + is32bit = 0; + break; + case VSD_DTYPE_DRHIST64: + nbkts = HIST_VSDSZ2NBKTS(drhist64, hist_dsz); + is32bit = 0; + break; + case VSD_DTYPE_DVHIST64: + nbkts = HIST_VSDSZ2NBKTS(dvhist64, hist_dsz); + is32bit = 0; + break; + default: + return; + } + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "nbkts=%hu, "; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "\"nbkts\":%hu,"; + break; + } + sbuf_printf(buf, fmtstr, nbkts); + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = (is32bit ? "oob=%u" : "oob=%ju"); + break; + case SB_STRFMT_JSON: + default: + fmtstr = (is32bit ? "\"oob\":%u,\"bkts\":[" : + "\"oob\":%ju,\"bkts\":["); + break; + } + sbuf_printf(buf, fmtstr, is32bit ? VSD_CONSTHIST_FIELDVAL(hist, + hist_dtype, oob) : (uintmax_t)VSD_CONSTHIST_FIELDVAL(hist, + hist_dtype, oob)); + + for (i = 0; i < nbkts; i++) { + switch (hist_dtype) { + case VSD_DTYPE_CRHIST32: + case VSD_DTYPE_CRHIST64: + bkt_lb = VSD_CONSTCRHIST_FIELDPTR(hist, hist_dtype, + bkts[i].lb); + if (i < nbkts - 1) + bkt_ub = VSD_CONSTCRHIST_FIELDPTR(hist, + hist_dtype, bkts[i + 1].lb); + else + bkt_ub = &numeric_limits[LIM_MAX][voi_dtype]; + break; + case VSD_DTYPE_DRHIST32: + case VSD_DTYPE_DRHIST64: + bkt_lb = VSD_CONSTDRHIST_FIELDPTR(hist, hist_dtype, + bkts[i].lb); + bkt_ub = VSD_CONSTDRHIST_FIELDPTR(hist, hist_dtype, + bkts[i].ub); + break; + case VSD_DTYPE_DVHIST32: + case VSD_DTYPE_DVHIST64: + bkt_lb = bkt_ub = VSD_CONSTDVHIST_FIELDPTR(hist, + hist_dtype, bkts[i].val); + break; + default: + break; + } + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "\n\t\t\t\t"; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "{"; + break; + } + sbuf_cat(buf, fmtstr); + + if (objdump) { + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "bkt[%hu]."; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "\"bkt\":%hu,"; + break; + } + sbuf_printf(buf, fmtstr, i); + } + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "{lb="; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "\"lb\":"; + break; + } + sbuf_cat(buf, fmtstr); + stats_voistatdata_tostr((const struct voistatdata *)bkt_lb, + voi_dtype, voi_dtype, sizeof(struct voistatdata_numeric), + fmt, buf, objdump); + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = ",ub="; + break; + case SB_STRFMT_JSON: + default: + fmtstr = ",\"ub\":"; + break; + } + sbuf_cat(buf, fmtstr); + stats_voistatdata_tostr((const struct voistatdata *)bkt_ub, + voi_dtype, voi_dtype, sizeof(struct voistatdata_numeric), + fmt, buf, objdump); + + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = is32bit ? ",cnt=%u}" : ",cnt=%ju}"; + break; + case SB_STRFMT_JSON: + default: + fmtstr = is32bit ? ",\"cnt\":%u}" : ",\"cnt\":%ju}"; + break; + } + sbuf_printf(buf, fmtstr, is32bit ? + VSD_CONSTHIST_FIELDVAL(hist, hist_dtype, bkts[i].cnt) : + (uintmax_t)VSD_CONSTHIST_FIELDVAL(hist, hist_dtype, + bkts[i].cnt)); + + if (fmt == SB_STRFMT_JSON && i < nbkts - 1) + sbuf_putc(buf, ','); + } + if (fmt == SB_STRFMT_JSON) + sbuf_cat(buf, "]"); +} + +int +stats_voistatdata_tostr(const struct voistatdata *vsd, enum vsd_dtype voi_dtype, + enum vsd_dtype vsd_dtype, size_t vsd_sz, enum sb_str_fmt fmt, + struct sbuf *buf, int objdump) +{ + const char *fmtstr; + + if (vsd == NULL || buf == NULL || voi_dtype >= VSD_NUM_DTYPES || + vsd_dtype >= VSD_NUM_DTYPES || fmt >= SB_STRFMT_NUM_FMTS) + return (EINVAL); + + switch (vsd_dtype) { + case VSD_DTYPE_VOISTATE: + switch (fmt) { + case SB_STRFMT_FREEFORM: + fmtstr = "prev="; + break; + case SB_STRFMT_JSON: + default: + fmtstr = "\"prev\":"; + break; + } + sbuf_cat(buf, fmtstr); + /* + * Render prev by passing it as *vsd and voi_dtype as vsd_dtype. + */ + stats_voistatdata_tostr( + (const struct voistatdata *)&CONSTVSD(voistate, vsd)->prev, + voi_dtype, voi_dtype, vsd_sz, fmt, buf, objdump); + break; + case VSD_DTYPE_INT_S32: + sbuf_printf(buf, "%d", vsd->int32.s32); + break; + case VSD_DTYPE_INT_U32: + sbuf_printf(buf, "%u", vsd->int32.u32); + break; + case VSD_DTYPE_INT_S64: + sbuf_printf(buf, "%jd", (intmax_t)vsd->int64.s64); + break; + case VSD_DTYPE_INT_U64: + sbuf_printf(buf, "%ju", (uintmax_t)vsd->int64.u64); + break; + case VSD_DTYPE_INT_SLONG: + sbuf_printf(buf, "%ld", vsd->intlong.slong); + break; + case VSD_DTYPE_INT_ULONG: + sbuf_printf(buf, "%lu", vsd->intlong.ulong); + break; + case VSD_DTYPE_Q_S32: + { + char qstr[Q_MAXSTRLEN(vsd->q32.sq32, 10)]; + Q_TOSTR((s32q_t)vsd->q32.sq32, -1, 10, qstr, sizeof(qstr)); + sbuf_cat(buf, qstr); + } + break; + case VSD_DTYPE_Q_U32: + { + char qstr[Q_MAXSTRLEN(vsd->q32.uq32, 10)]; + Q_TOSTR((u32q_t)vsd->q32.uq32, -1, 10, qstr, sizeof(qstr)); + sbuf_cat(buf, qstr); + } + break; + case VSD_DTYPE_Q_S64: + { + char qstr[Q_MAXSTRLEN(vsd->q64.sq64, 10)]; + Q_TOSTR((s64q_t)vsd->q64.sq64, -1, 10, qstr, sizeof(qstr)); + sbuf_cat(buf, qstr); + } + break; + case VSD_DTYPE_Q_U64: + { + char qstr[Q_MAXSTRLEN(vsd->q64.uq64, 10)]; + Q_TOSTR((u64q_t)vsd->q64.uq64, -1, 10, qstr, sizeof(qstr)); + sbuf_cat(buf, qstr); + } + break; + case VSD_DTYPE_CRHIST32: + case VSD_DTYPE_DRHIST32: + case VSD_DTYPE_DVHIST32: + case VSD_DTYPE_CRHIST64: + case VSD_DTYPE_DRHIST64: + case VSD_DTYPE_DVHIST64: + stats_voistatdata_hist_tostr(voi_dtype, CONSTVSD(hist, vsd), + vsd_dtype, vsd_sz, fmt, buf, objdump); + break; + case VSD_DTYPE_TDGSTCLUST32: + case VSD_DTYPE_TDGSTCLUST64: + stats_voistatdata_tdgst_tostr(voi_dtype, + CONSTVSD(tdgst, vsd), vsd_dtype, vsd_sz, fmt, buf, + objdump); + break; + default: + break; + } + + return (sbuf_error(buf)); +} + +static void +stats_v1_itercb_tostr_freeform(struct statsblobv1 *sb, struct voi *v, + struct voistat *vs, struct sb_iter_ctx *ctx) +{ + struct sb_tostrcb_ctx *sctx; + struct metablob *tpl_mb; + struct sbuf *buf; + void *vsd; + uint8_t dump; + + sctx = ctx->usrctx; + buf = sctx->buf; + tpl_mb = sctx->tpl ? sctx->tpl->mb : NULL; + dump = ((sctx->flags & SB_TOSTR_OBJDUMP) != 0); + + if (ctx->flags & SB_IT_FIRST_CB) { + sbuf_printf(buf, "struct statsblobv1@%p", sb); + if (dump) { + sbuf_printf(buf, ", abi=%hhu, endian=%hhu, maxsz=%hu, " + "cursz=%hu, created=%jd, lastrst=%jd, flags=0x%04hx, " + "stats_off=%hu, statsdata_off=%hu", + sb->abi, sb->endian, sb->maxsz, sb->cursz, + sb->created, sb->lastrst, sb->flags, sb->stats_off, + sb->statsdata_off); + } + sbuf_printf(buf, ", tplhash=%u", sb->tplhash); + } + + if (ctx->flags & SB_IT_FIRST_VOISTAT) { + sbuf_printf(buf, "\n\tvois[%hd]: id=%hd", ctx->vslot, v->id); + if (v->id < 0) + return; + sbuf_printf(buf, ", name=\"%s\"", (tpl_mb == NULL) ? "" : + tpl_mb->voi_meta[v->id].name); + if (dump) + sbuf_printf(buf, ", flags=0x%04hx, dtype=%s, " + "voistatmaxid=%hhd, stats_off=%hu", v->flags, + vsd_dtype2name[v->dtype], v->voistatmaxid, v->stats_off); + } + + if (!dump && vs->stype <= 0) + return; + + sbuf_printf(buf, "\n\t\tvois[%hd]stat[%hhd]: stype=", v->id, ctx->vsslot); + if (vs->stype < 0) { + sbuf_printf(buf, "%hhd", vs->stype); + return; + } else + sbuf_printf(buf, "%s, errs=%hu", vs_stype2name[vs->stype], + vs->errs); + vsd = BLOB_OFFSET(sb, vs->data_off); + if (dump) + sbuf_printf(buf, ", flags=0x%04x, dtype=%s, dsz=%hu, " + "data_off=%hu", vs->flags, vsd_dtype2name[vs->dtype], + vs->dsz, vs->data_off); + + sbuf_printf(buf, "\n\t\t\tvoistatdata: "); + stats_voistatdata_tostr(vsd, v->dtype, vs->dtype, vs->dsz, + sctx->fmt, buf, dump); +} + +static void +stats_v1_itercb_tostr_json(struct statsblobv1 *sb, struct voi *v, struct voistat *vs, + struct sb_iter_ctx *ctx) +{ + struct sb_tostrcb_ctx *sctx; + struct metablob *tpl_mb; + struct sbuf *buf; + const char *fmtstr; + void *vsd; + uint8_t dump; + + sctx = ctx->usrctx; + buf = sctx->buf; + tpl_mb = sctx->tpl ? sctx->tpl->mb : NULL; + dump = ((sctx->flags & SB_TOSTR_OBJDUMP) != 0); + + if (ctx->flags & SB_IT_FIRST_CB) { + sbuf_putc(buf, '{'); + if (dump) { + sbuf_printf(buf, "\"abi\":%hhu,\"endian\":%hhu," + "\"maxsz\":%hu,\"cursz\":%hu,\"created\":%jd," + "\"lastrst\":%jd,\"flags\":%hu,\"stats_off\":%hu," + "\"statsdata_off\":%hu,", sb->abi, + sb->endian, sb->maxsz, sb->cursz, sb->created, + sb->lastrst, sb->flags, sb->stats_off, + sb->statsdata_off); + } + + if (tpl_mb == NULL) + fmtstr = "\"tplname\":%s,\"tplhash\":%u,\"vois\":{"; + else + fmtstr = "\"tplname\":\"%s\",\"tplhash\":%u,\"vois\":{"; + + sbuf_printf(buf, fmtstr, tpl_mb ? tpl_mb->tplname : "null", + sb->tplhash); + } + + if (ctx->flags & SB_IT_FIRST_VOISTAT) { + if (dump) { + sbuf_printf(buf, "\"[%d]\":{\"id\":%d", ctx->vslot, + v->id); + if (v->id < 0) { + sbuf_printf(buf, "},"); + return; + } + + if (tpl_mb == NULL) + fmtstr = ",\"name\":%s,\"flags\":%hu," + "\"dtype\":\"%s\",\"voistatmaxid\":%hhd," + "\"stats_off\":%hu,"; + else + fmtstr = ",\"name\":\"%s\",\"flags\":%hu," + "\"dtype\":\"%s\",\"voistatmaxid\":%hhd," + "\"stats_off\":%hu,"; + + sbuf_printf(buf, fmtstr, tpl_mb ? + tpl_mb->voi_meta[v->id].name : "null", v->flags, + vsd_dtype2name[v->dtype], v->voistatmaxid, + v->stats_off); + } else { + if (tpl_mb == NULL) { + sbuf_printf(buf, "\"[%hd]\":{", v->id); + } else { + sbuf_printf(buf, "\"%s\":{", + tpl_mb->voi_meta[v->id].name); + } + } + sbuf_cat(buf, "\"stats\":{"); + } + + vsd = BLOB_OFFSET(sb, vs->data_off); + if (dump) { + sbuf_printf(buf, "\"[%hhd]\":", ctx->vsslot); + if (vs->stype < 0) { + sbuf_printf(buf, "{\"stype\":-1},"); + return; + } + sbuf_printf(buf, "{\"stype\":\"%s\",\"errs\":%hu,\"flags\":%hu," + "\"dtype\":\"%s\",\"data_off\":%hu,\"voistatdata\":{", + vs_stype2name[vs->stype], vs->errs, vs->flags, + vsd_dtype2name[vs->dtype], vs->data_off); + } else if (vs->stype > 0) { + if (tpl_mb == NULL) + sbuf_printf(buf, "\"[%hhd]\":", vs->stype); + else + sbuf_printf(buf, "\"%s\":", vs_stype2name[vs->stype]); + } else + return; + + if ((vs->flags & VS_VSDVALID) || dump) { + if (!dump) + sbuf_printf(buf, "{\"errs\":%hu,", vs->errs); + /* Simple non-compound VSD types need a key. */ + if (!vsd_compoundtype[vs->dtype]) + sbuf_cat(buf, "\"val\":"); + stats_voistatdata_tostr(vsd, v->dtype, vs->dtype, vs->dsz, + sctx->fmt, buf, dump); + sbuf_cat(buf, dump ? "}}" : "}"); + } else + sbuf_cat(buf, dump ? "null}" : "null"); + + if (ctx->flags & SB_IT_LAST_VOISTAT) + sbuf_cat(buf, "}}"); + + if (ctx->flags & SB_IT_LAST_CB) + sbuf_cat(buf, "}}"); + else + sbuf_putc(buf, ','); +} + +static int +stats_v1_itercb_tostr(struct statsblobv1 *sb, struct voi *v, struct voistat *vs, + struct sb_iter_ctx *ctx) +{ + struct sb_tostrcb_ctx *sctx; + + sctx = ctx->usrctx; + + switch (sctx->fmt) { + case SB_STRFMT_FREEFORM: + stats_v1_itercb_tostr_freeform(sb, v, vs, ctx); + break; + case SB_STRFMT_JSON: + stats_v1_itercb_tostr_json(sb, v, vs, ctx); + break; + default: + break; + } + + return (sbuf_error(sctx->buf)); +} + +int +stats_v1_blob_tostr(struct statsblobv1 *sb, struct sbuf *buf, + enum sb_str_fmt fmt, uint32_t flags) +{ + struct sb_tostrcb_ctx sctx; + uint32_t iflags; + + if (sb == NULL || sb->abi != STATS_ABI_V1 || buf == NULL || + fmt >= SB_STRFMT_NUM_FMTS) + return (EINVAL); + + sctx.buf = buf; + sctx.fmt = fmt; + sctx.flags = flags; + + if (flags & SB_TOSTR_META) { + if (stats_tpl_fetch(stats_tpl_fetch_allocid(NULL, sb->tplhash), + &sctx.tpl)) + return (EINVAL); + } else + sctx.tpl = NULL; + + iflags = 0; + if (flags & SB_TOSTR_OBJDUMP) + iflags |= (SB_IT_NULLVOI | SB_IT_NULLVOISTAT); + stats_v1_blob_iter(sb, stats_v1_itercb_tostr, &sctx, iflags); + + return (sbuf_error(buf)); +} + +static int +stats_v1_itercb_visit(struct statsblobv1 *sb, struct voi *v, + struct voistat *vs, struct sb_iter_ctx *ctx) +{ + struct sb_visitcb_ctx *vctx; + struct sb_visit sbv; + + vctx = ctx->usrctx; + + sbv.tplhash = sb->tplhash; + sbv.voi_id = v->id; + sbv.voi_dtype = v->dtype; + sbv.vs_stype = vs->stype; + sbv.vs_dtype = vs->dtype; + sbv.vs_dsz = vs->dsz; + sbv.vs_data = BLOB_OFFSET(sb, vs->data_off); + sbv.vs_errs = vs->errs; + sbv.flags = ctx->flags & (SB_IT_FIRST_CB | SB_IT_LAST_CB | + SB_IT_FIRST_VOI | SB_IT_LAST_VOI | SB_IT_FIRST_VOISTAT | + SB_IT_LAST_VOISTAT); + + return (vctx->cb(&sbv, vctx->usrctx)); +} + +int +stats_v1_blob_visit(struct statsblobv1 *sb, stats_blob_visitcb_t func, + void *usrctx) +{ + struct sb_visitcb_ctx vctx; + + if (sb == NULL || sb->abi != STATS_ABI_V1 || func == NULL) + return (EINVAL); + + vctx.cb = func; + vctx.usrctx = usrctx; + + stats_v1_blob_iter(sb, stats_v1_itercb_visit, &vctx, 0); + + return (0); +} + +static int +stats_v1_icb_reset_voistat(struct statsblobv1 *sb, struct voi *v __unused, + struct voistat *vs, struct sb_iter_ctx *ctx __unused) +{ + void *vsd; + + if (vs->stype == VS_STYPE_VOISTATE) + return (0); + + vsd = BLOB_OFFSET(sb, vs->data_off); + + /* Perform the stat type's default reset action. */ + switch (vs->stype) { + case VS_STYPE_SUM: + switch (vs->dtype) { + case VSD_DTYPE_Q_S32: + Q_SIFVAL(VSD(q32, vsd)->sq32, 0); + break; + case VSD_DTYPE_Q_U32: + Q_SIFVAL(VSD(q32, vsd)->uq32, 0); + break; + case VSD_DTYPE_Q_S64: + Q_SIFVAL(VSD(q64, vsd)->sq64, 0); + break; + case VSD_DTYPE_Q_U64: + Q_SIFVAL(VSD(q64, vsd)->uq64, 0); + break; + default: + bzero(vsd, vs->dsz); + break; + } + break; + case VS_STYPE_MAX: + switch (vs->dtype) { + case VSD_DTYPE_Q_S32: + Q_SIFVAL(VSD(q32, vsd)->sq32, + Q_IFMINVAL(VSD(q32, vsd)->sq32)); + break; + case VSD_DTYPE_Q_U32: + Q_SIFVAL(VSD(q32, vsd)->uq32, + Q_IFMINVAL(VSD(q32, vsd)->uq32)); + break; + case VSD_DTYPE_Q_S64: + Q_SIFVAL(VSD(q64, vsd)->sq64, + Q_IFMINVAL(VSD(q64, vsd)->sq64)); + break; + case VSD_DTYPE_Q_U64: + Q_SIFVAL(VSD(q64, vsd)->uq64, + Q_IFMINVAL(VSD(q64, vsd)->uq64)); + break; + default: + memcpy(vsd, &numeric_limits[LIM_MIN][vs->dtype], + vs->dsz); + break; + } + break; + case VS_STYPE_MIN: + switch (vs->dtype) { + case VSD_DTYPE_Q_S32: + Q_SIFVAL(VSD(q32, vsd)->sq32, + Q_IFMAXVAL(VSD(q32, vsd)->sq32)); + break; + case VSD_DTYPE_Q_U32: + Q_SIFVAL(VSD(q32, vsd)->uq32, + Q_IFMAXVAL(VSD(q32, vsd)->uq32)); + break; + case VSD_DTYPE_Q_S64: + Q_SIFVAL(VSD(q64, vsd)->sq64, + Q_IFMAXVAL(VSD(q64, vsd)->sq64)); + break; + case VSD_DTYPE_Q_U64: + Q_SIFVAL(VSD(q64, vsd)->uq64, + Q_IFMAXVAL(VSD(q64, vsd)->uq64)); + break; + default: + memcpy(vsd, &numeric_limits[LIM_MAX][vs->dtype], + vs->dsz); + break; + } + break; + case VS_STYPE_HIST: + { + /* Reset bucket counts. */ + struct voistatdata_hist *hist; + int i, is32bit; + uint16_t nbkts; + + hist = VSD(hist, vsd); + switch (vs->dtype) { + case VSD_DTYPE_CRHIST32: + nbkts = HIST_VSDSZ2NBKTS(crhist32, vs->dsz); + is32bit = 1; + break; + case VSD_DTYPE_DRHIST32: + nbkts = HIST_VSDSZ2NBKTS(drhist32, vs->dsz); + is32bit = 1; + break; + case VSD_DTYPE_DVHIST32: + nbkts = HIST_VSDSZ2NBKTS(dvhist32, vs->dsz); + is32bit = 1; + break; + case VSD_DTYPE_CRHIST64: + nbkts = HIST_VSDSZ2NBKTS(crhist64, vs->dsz); + is32bit = 0; + break; + case VSD_DTYPE_DRHIST64: + nbkts = HIST_VSDSZ2NBKTS(drhist64, vs->dsz); + is32bit = 0; + break; + case VSD_DTYPE_DVHIST64: + nbkts = HIST_VSDSZ2NBKTS(dvhist64, vs->dsz); + is32bit = 0; + break; + default: + return (0); + } + + bzero(VSD_HIST_FIELDPTR(hist, vs->dtype, oob), + is32bit ? sizeof(uint32_t) : sizeof(uint64_t)); + for (i = nbkts - 1; i >= 0; i--) { + bzero(VSD_HIST_FIELDPTR(hist, vs->dtype, + bkts[i].cnt), is32bit ? sizeof(uint32_t) : + sizeof(uint64_t)); + } + break; + } + case VS_STYPE_TDGST: + { + /* Reset sample count centroids array/tree. */ + struct voistatdata_tdgst *tdgst; + struct ctdth32 *ctd32tree; + struct ctdth64 *ctd64tree; + struct voistatdata_tdgstctd32 *ctd32; + struct voistatdata_tdgstctd64 *ctd64; + + tdgst = VSD(tdgst, vsd); + switch (vs->dtype) { + case VSD_DTYPE_TDGSTCLUST32: + VSD(tdgstclust32, tdgst)->smplcnt = 0; + VSD(tdgstclust32, tdgst)->compcnt = 0; + ctd32tree = &VSD(tdgstclust32, tdgst)->ctdtree; + ARB_INIT(ctd32, ctdlnk, ctd32tree, + ARB_MAXNODES(ctd32tree)) { + ctd32->cnt = 0; + Q_SIFVAL(ctd32->mu, 0); + } +#ifdef DIAGNOSTIC + RB_INIT(&VSD(tdgstclust32, tdgst)->rbctdtree); +#endif + break; + case VSD_DTYPE_TDGSTCLUST64: + VSD(tdgstclust64, tdgst)->smplcnt = 0; + VSD(tdgstclust64, tdgst)->compcnt = 0; + ctd64tree = &VSD(tdgstclust64, tdgst)->ctdtree; + ARB_INIT(ctd64, ctdlnk, ctd64tree, + ARB_MAXNODES(ctd64tree)) { + ctd64->cnt = 0; + Q_SIFVAL(ctd64->mu, 0); + } +#ifdef DIAGNOSTIC + RB_INIT(&VSD(tdgstclust64, tdgst)->rbctdtree); +#endif + break; + default: + return (0); + } + break; + } + default: + KASSERT(0, ("Unknown VOI stat type %d", vs->stype)); + break; + } + + vs->errs = 0; + vs->flags &= ~VS_VSDVALID; + + return (0); +} + +int +stats_v1_blob_snapshot(struct statsblobv1 **dst, size_t dstmaxsz, + struct statsblobv1 *src, uint32_t flags) +{ + int error; + + if (src != NULL && src->abi == STATS_ABI_V1) { + error = stats_v1_blob_clone(dst, dstmaxsz, src, flags); + if (!error) { + if (flags & SB_CLONE_RSTSRC) { + stats_v1_blob_iter(src, + stats_v1_icb_reset_voistat, NULL, 0); + src->lastrst = stats_sbinuptime(); + } + stats_v1_blob_finalise(*dst); + } + } else + error = EINVAL; + + return (error); +} + +static inline int +stats_v1_voi_update_max(enum vsd_dtype voi_dtype __unused, + struct voistatdata *voival, struct voistat *vs, void *vsd) +{ + int error; + + KASSERT(vs->dtype < VSD_NUM_DTYPES, + ("Unknown VSD dtype %d", vs->dtype)); + + error = 0; + + switch (vs->dtype) { + case VSD_DTYPE_INT_S32: + if (VSD(int32, vsd)->s32 < voival->int32.s32) { + VSD(int32, vsd)->s32 = voival->int32.s32; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_U32: + if (VSD(int32, vsd)->u32 < voival->int32.u32) { + VSD(int32, vsd)->u32 = voival->int32.u32; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_S64: + if (VSD(int64, vsd)->s64 < voival->int64.s64) { + VSD(int64, vsd)->s64 = voival->int64.s64; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_U64: + if (VSD(int64, vsd)->u64 < voival->int64.u64) { + VSD(int64, vsd)->u64 = voival->int64.u64; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_SLONG: + if (VSD(intlong, vsd)->slong < voival->intlong.slong) { + VSD(intlong, vsd)->slong = voival->intlong.slong; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_ULONG: + if (VSD(intlong, vsd)->ulong < voival->intlong.ulong) { + VSD(intlong, vsd)->ulong = voival->intlong.ulong; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_S32: + if (Q_QLTQ(VSD(q32, vsd)->sq32, voival->q32.sq32) && + (0 == (error = Q_QCPYVALQ(&VSD(q32, vsd)->sq32, + voival->q32.sq32)))) { + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_U32: + if (Q_QLTQ(VSD(q32, vsd)->uq32, voival->q32.uq32) && + (0 == (error = Q_QCPYVALQ(&VSD(q32, vsd)->uq32, + voival->q32.uq32)))) { + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_S64: + if (Q_QLTQ(VSD(q64, vsd)->sq64, voival->q64.sq64) && + (0 == (error = Q_QCPYVALQ(&VSD(q64, vsd)->sq64, + voival->q64.sq64)))) { + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_U64: + if (Q_QLTQ(VSD(q64, vsd)->uq64, voival->q64.uq64) && + (0 == (error = Q_QCPYVALQ(&VSD(q64, vsd)->uq64, + voival->q64.uq64)))) { + vs->flags |= VS_VSDVALID; + } + break; + default: + error = EINVAL; + break; + } + + return (error); +} + +static inline int +stats_v1_voi_update_min(enum vsd_dtype voi_dtype __unused, + struct voistatdata *voival, struct voistat *vs, void *vsd) +{ + int error; + + KASSERT(vs->dtype < VSD_NUM_DTYPES, + ("Unknown VSD dtype %d", vs->dtype)); + + error = 0; + + switch (vs->dtype) { + case VSD_DTYPE_INT_S32: + if (VSD(int32, vsd)->s32 > voival->int32.s32) { + VSD(int32, vsd)->s32 = voival->int32.s32; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_U32: + if (VSD(int32, vsd)->u32 > voival->int32.u32) { + VSD(int32, vsd)->u32 = voival->int32.u32; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_S64: + if (VSD(int64, vsd)->s64 > voival->int64.s64) { + VSD(int64, vsd)->s64 = voival->int64.s64; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_U64: + if (VSD(int64, vsd)->u64 > voival->int64.u64) { + VSD(int64, vsd)->u64 = voival->int64.u64; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_SLONG: + if (VSD(intlong, vsd)->slong > voival->intlong.slong) { + VSD(intlong, vsd)->slong = voival->intlong.slong; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_INT_ULONG: + if (VSD(intlong, vsd)->ulong > voival->intlong.ulong) { + VSD(intlong, vsd)->ulong = voival->intlong.ulong; + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_S32: + if (Q_QGTQ(VSD(q32, vsd)->sq32, voival->q32.sq32) && + (0 == (error = Q_QCPYVALQ(&VSD(q32, vsd)->sq32, + voival->q32.sq32)))) { + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_U32: + if (Q_QGTQ(VSD(q32, vsd)->uq32, voival->q32.uq32) && + (0 == (error = Q_QCPYVALQ(&VSD(q32, vsd)->uq32, + voival->q32.uq32)))) { + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_S64: + if (Q_QGTQ(VSD(q64, vsd)->sq64, voival->q64.sq64) && + (0 == (error = Q_QCPYVALQ(&VSD(q64, vsd)->sq64, + voival->q64.sq64)))) { + vs->flags |= VS_VSDVALID; + } + break; + case VSD_DTYPE_Q_U64: + if (Q_QGTQ(VSD(q64, vsd)->uq64, voival->q64.uq64) && + (0 == (error = Q_QCPYVALQ(&VSD(q64, vsd)->uq64, + voival->q64.uq64)))) { + vs->flags |= VS_VSDVALID; + } + break; + default: + error = EINVAL; + break; + } + + return (error); +} + +static inline int +stats_v1_voi_update_sum(enum vsd_dtype voi_dtype __unused, + struct voistatdata *voival, struct voistat *vs, void *vsd) +{ + int error; + + KASSERT(vs->dtype < VSD_NUM_DTYPES, + ("Unknown VSD dtype %d", vs->dtype)); + + error = 0; + + switch (vs->dtype) { + case VSD_DTYPE_INT_S32: + VSD(int32, vsd)->s32 += voival->int32.s32; + break; + case VSD_DTYPE_INT_U32: + VSD(int32, vsd)->u32 += voival->int32.u32; + break; + case VSD_DTYPE_INT_S64: + VSD(int64, vsd)->s64 += voival->int64.s64; + break; + case VSD_DTYPE_INT_U64: + VSD(int64, vsd)->u64 += voival->int64.u64; + break; + case VSD_DTYPE_INT_SLONG: + VSD(intlong, vsd)->slong += voival->intlong.slong; + break; + case VSD_DTYPE_INT_ULONG: + VSD(intlong, vsd)->ulong += voival->intlong.ulong; + break; + case VSD_DTYPE_Q_S32: + error = Q_QADDQ(&VSD(q32, vsd)->sq32, voival->q32.sq32); + break; + case VSD_DTYPE_Q_U32: + error = Q_QADDQ(&VSD(q32, vsd)->uq32, voival->q32.uq32); + break; + case VSD_DTYPE_Q_S64: + error = Q_QADDQ(&VSD(q64, vsd)->sq64, voival->q64.sq64); + break; + case VSD_DTYPE_Q_U64: + error = Q_QADDQ(&VSD(q64, vsd)->uq64, voival->q64.uq64); + break; + default: + error = EINVAL; + break; + } + + if (!error) + vs->flags |= VS_VSDVALID; + + return (error); +} + +static inline int +stats_v1_voi_update_hist(enum vsd_dtype voi_dtype, struct voistatdata *voival, + struct voistat *vs, struct voistatdata_hist *hist) +{ + struct voistatdata_numeric *bkt_lb, *bkt_ub; + uint64_t *oob64, *cnt64; + uint32_t *oob32, *cnt32; + int error, i, found, is32bit, has_ub, eq_only; + + error = 0; + + switch (vs->dtype) { + case VSD_DTYPE_CRHIST32: + i = HIST_VSDSZ2NBKTS(crhist32, vs->dsz); + is32bit = 1; + has_ub = eq_only = 0; + oob32 = &VSD(crhist32, hist)->oob; + break; + case VSD_DTYPE_DRHIST32: + i = HIST_VSDSZ2NBKTS(drhist32, vs->dsz); + is32bit = has_ub = 1; + eq_only = 0; + oob32 = &VSD(drhist32, hist)->oob; + break; + case VSD_DTYPE_DVHIST32: + i = HIST_VSDSZ2NBKTS(dvhist32, vs->dsz); + is32bit = eq_only = 1; + has_ub = 0; + oob32 = &VSD(dvhist32, hist)->oob; + break; + case VSD_DTYPE_CRHIST64: + i = HIST_VSDSZ2NBKTS(crhist64, vs->dsz); + is32bit = has_ub = eq_only = 0; + oob64 = &VSD(crhist64, hist)->oob; + break; + case VSD_DTYPE_DRHIST64: + i = HIST_VSDSZ2NBKTS(drhist64, vs->dsz); + is32bit = eq_only = 0; + has_ub = 1; + oob64 = &VSD(drhist64, hist)->oob; + break; + case VSD_DTYPE_DVHIST64: + i = HIST_VSDSZ2NBKTS(dvhist64, vs->dsz); + is32bit = has_ub = 0; + eq_only = 1; + oob64 = &VSD(dvhist64, hist)->oob; + break; + default: + return (EINVAL); + } + i--; /* Adjust for 0-based array index. */ + + /* XXXLAS: Should probably use a better bucket search algorithm. ARB? */ + for (found = 0; i >= 0 && !found; i--) { + switch (vs->dtype) { + case VSD_DTYPE_CRHIST32: + bkt_lb = &VSD(crhist32, hist)->bkts[i].lb; + cnt32 = &VSD(crhist32, hist)->bkts[i].cnt; + break; + case VSD_DTYPE_DRHIST32: + bkt_lb = &VSD(drhist32, hist)->bkts[i].lb; + bkt_ub = &VSD(drhist32, hist)->bkts[i].ub; + cnt32 = &VSD(drhist32, hist)->bkts[i].cnt; + break; + case VSD_DTYPE_DVHIST32: + bkt_lb = &VSD(dvhist32, hist)->bkts[i].val; + cnt32 = &VSD(dvhist32, hist)->bkts[i].cnt; + break; + case VSD_DTYPE_CRHIST64: + bkt_lb = &VSD(crhist64, hist)->bkts[i].lb; + cnt64 = &VSD(crhist64, hist)->bkts[i].cnt; + break; + case VSD_DTYPE_DRHIST64: + bkt_lb = &VSD(drhist64, hist)->bkts[i].lb; + bkt_ub = &VSD(drhist64, hist)->bkts[i].ub; + cnt64 = &VSD(drhist64, hist)->bkts[i].cnt; + break; + case VSD_DTYPE_DVHIST64: + bkt_lb = &VSD(dvhist64, hist)->bkts[i].val; + cnt64 = &VSD(dvhist64, hist)->bkts[i].cnt; + break; + default: + return (EINVAL); + } + + switch (voi_dtype) { + case VSD_DTYPE_INT_S32: + if (voival->int32.s32 >= bkt_lb->int32.s32) { + if ((eq_only && voival->int32.s32 == + bkt_lb->int32.s32) || + (!eq_only && (!has_ub || + voival->int32.s32 < bkt_ub->int32.s32))) + found = 1; + } + break; + case VSD_DTYPE_INT_U32: + if (voival->int32.u32 >= bkt_lb->int32.u32) { + if ((eq_only && voival->int32.u32 == + bkt_lb->int32.u32) || + (!eq_only && (!has_ub || + voival->int32.u32 < bkt_ub->int32.u32))) + found = 1; + } + break; + case VSD_DTYPE_INT_S64: + if (voival->int64.s64 >= bkt_lb->int64.s64) + if ((eq_only && voival->int64.s64 == + bkt_lb->int64.s64) || + (!eq_only && (!has_ub || + voival->int64.s64 < bkt_ub->int64.s64))) + found = 1; + break; + case VSD_DTYPE_INT_U64: + if (voival->int64.u64 >= bkt_lb->int64.u64) + if ((eq_only && voival->int64.u64 == + bkt_lb->int64.u64) || + (!eq_only && (!has_ub || + voival->int64.u64 < bkt_ub->int64.u64))) + found = 1; + break; + case VSD_DTYPE_INT_SLONG: + if (voival->intlong.slong >= bkt_lb->intlong.slong) + if ((eq_only && voival->intlong.slong == + bkt_lb->intlong.slong) || + (!eq_only && (!has_ub || + voival->intlong.slong < + bkt_ub->intlong.slong))) + found = 1; + break; + case VSD_DTYPE_INT_ULONG: + if (voival->intlong.ulong >= bkt_lb->intlong.ulong) + if ((eq_only && voival->intlong.ulong == + bkt_lb->intlong.ulong) || + (!eq_only && (!has_ub || + voival->intlong.ulong < + bkt_ub->intlong.ulong))) + found = 1; + break; + case VSD_DTYPE_Q_S32: + if (Q_QGEQ(voival->q32.sq32, bkt_lb->q32.sq32)) + if ((eq_only && Q_QEQ(voival->q32.sq32, + bkt_lb->q32.sq32)) || + (!eq_only && (!has_ub || + Q_QLTQ(voival->q32.sq32, + bkt_ub->q32.sq32)))) + found = 1; + break; + case VSD_DTYPE_Q_U32: + if (Q_QGEQ(voival->q32.uq32, bkt_lb->q32.uq32)) + if ((eq_only && Q_QEQ(voival->q32.uq32, + bkt_lb->q32.uq32)) || + (!eq_only && (!has_ub || + Q_QLTQ(voival->q32.uq32, + bkt_ub->q32.uq32)))) + found = 1; + break; + case VSD_DTYPE_Q_S64: + if (Q_QGEQ(voival->q64.sq64, bkt_lb->q64.sq64)) + if ((eq_only && Q_QEQ(voival->q64.sq64, + bkt_lb->q64.sq64)) || + (!eq_only && (!has_ub || + Q_QLTQ(voival->q64.sq64, + bkt_ub->q64.sq64)))) + found = 1; + break; + case VSD_DTYPE_Q_U64: + if (Q_QGEQ(voival->q64.uq64, bkt_lb->q64.uq64)) + if ((eq_only && Q_QEQ(voival->q64.uq64, + bkt_lb->q64.uq64)) || + (!eq_only && (!has_ub || + Q_QLTQ(voival->q64.uq64, + bkt_ub->q64.uq64)))) + found = 1; + break; + default: + break; + } + } + + if (found) { + if (is32bit) + *cnt32 += 1; + else + *cnt64 += 1; + } else { + if (is32bit) + *oob32 += 1; + else + *oob64 += 1; + } + + vs->flags |= VS_VSDVALID; + return (error); +} + +static inline int +stats_v1_vsd_tdgst_compress(enum vsd_dtype vs_dtype, + struct voistatdata_tdgst *tdgst, int attempt) +{ + struct ctdth32 *ctd32tree; + struct ctdth64 *ctd64tree; + struct voistatdata_tdgstctd32 *ctd32; + struct voistatdata_tdgstctd64 *ctd64; + uint64_t ebits, idxmask; + uint32_t bitsperidx, nebits; + int error, idx, is32bit, maxctds, remctds, tmperr; + + error = 0; + + switch (vs_dtype) { + case VSD_DTYPE_TDGSTCLUST32: + ctd32tree = &VSD(tdgstclust32, tdgst)->ctdtree; + if (!ARB_FULL(ctd32tree)) + return (0); + VSD(tdgstclust32, tdgst)->compcnt++; + maxctds = remctds = ARB_MAXNODES(ctd32tree); + ARB_RESET_TREE(ctd32tree, ctdth32, maxctds); + VSD(tdgstclust32, tdgst)->smplcnt = 0; + is32bit = 1; + ctd64tree = NULL; + ctd64 = NULL; +#ifdef DIAGNOSTIC + RB_INIT(&VSD(tdgstclust32, tdgst)->rbctdtree); +#endif + break; + case VSD_DTYPE_TDGSTCLUST64: + ctd64tree = &VSD(tdgstclust64, tdgst)->ctdtree; + if (!ARB_FULL(ctd64tree)) + return (0); + VSD(tdgstclust64, tdgst)->compcnt++; + maxctds = remctds = ARB_MAXNODES(ctd64tree); + ARB_RESET_TREE(ctd64tree, ctdth64, maxctds); + VSD(tdgstclust64, tdgst)->smplcnt = 0; + is32bit = 0; + ctd32tree = NULL; + ctd32 = NULL; +#ifdef DIAGNOSTIC + RB_INIT(&VSD(tdgstclust64, tdgst)->rbctdtree); +#endif + break; + default: + return (EINVAL); + } + + /* + * Rebuild the t-digest ARB by pseudorandomly selecting centroids and + * re-inserting the mu/cnt of each as a value and corresponding weight. + */ + +#define bitsperrand 31 /* Per random(3). */ + ebits = 0; + nebits = 0; + bitsperidx = fls(maxctds); + KASSERT(bitsperidx <= sizeof(ebits) << 3, + ("%s: bitsperidx=%d, ebits=%d", + __func__, bitsperidx, (int)(sizeof(ebits) << 3))); + idxmask = (UINT64_C(1) << bitsperidx) - 1; + srandom(stats_sbinuptime()); + + /* Initialise the free list with randomised centroid indices. */ + for (; remctds > 0; remctds--) { + while (nebits < bitsperidx) { + ebits |= ((uint64_t)random()) << nebits; + nebits += bitsperrand; + if (nebits > (sizeof(ebits) << 3)) + nebits = sizeof(ebits) << 3; + } + idx = ebits & idxmask; + nebits -= bitsperidx; + ebits >>= bitsperidx; + + /* + * Select the next centroid to put on the ARB free list. We + * start with the centroid at our randomly selected array index, + * and work our way forwards until finding one (the latter + * aspect reduces re-insertion randomness, but is good enough). + */ + do { + if (idx >= maxctds) + idx %= maxctds; + + if (is32bit) + ctd32 = ARB_NODE(ctd32tree, idx); + else + ctd64 = ARB_NODE(ctd64tree, idx); + } while ((is32bit ? ARB_ISFREE(ctd32, ctdlnk) : + ARB_ISFREE(ctd64, ctdlnk)) && ++idx); + + /* Put the centroid on the ARB free list. */ + if (is32bit) + ARB_RETURNFREE(ctd32tree, ctd32, ctdlnk); + else + ARB_RETURNFREE(ctd64tree, ctd64, ctdlnk); + } + + /* + * The free list now contains the randomised indices of every centroid. + * Walk the free list from start to end, re-inserting each centroid's + * mu/cnt. The tdgst_add() call may or may not consume the free centroid + * we re-insert values from during each loop iteration, so we must latch + * the index of the next free list centroid before the re-insertion + * call. The previous loop above should have left the centroid pointer + * pointing to the element at the head of the free list. + */ + KASSERT((is32bit ? + ARB_FREEIDX(ctd32tree) == ARB_SELFIDX(ctd32tree, ctd32) : + ARB_FREEIDX(ctd64tree) == ARB_SELFIDX(ctd64tree, ctd64)), + ("%s: t-digest ARB@%p free list bug", __func__, + (is32bit ? (void *)ctd32tree : (void *)ctd64tree))); + remctds = maxctds; + while ((is32bit ? ctd32 != NULL : ctd64 != NULL)) { + tmperr = 0; + if (is32bit) { + s64q_t x; + + idx = ARB_NEXTFREEIDX(ctd32, ctdlnk); + /* Cloning a s32q_t into a s64q_t should never fail. */ + tmperr = Q_QCLONEQ(&x, ctd32->mu); + tmperr = tmperr ? tmperr : stats_v1_vsd_tdgst_add( + vs_dtype, tdgst, x, ctd32->cnt, attempt); + ctd32 = ARB_NODE(ctd32tree, idx); + KASSERT(ctd32 == NULL || ARB_ISFREE(ctd32, ctdlnk), + ("%s: t-digest ARB@%p free list bug", __func__, + ctd32tree)); + } else { + idx = ARB_NEXTFREEIDX(ctd64, ctdlnk); + tmperr = stats_v1_vsd_tdgst_add(vs_dtype, tdgst, + ctd64->mu, ctd64->cnt, attempt); + ctd64 = ARB_NODE(ctd64tree, idx); + KASSERT(ctd64 == NULL || ARB_ISFREE(ctd64, ctdlnk), + ("%s: t-digest ARB@%p free list bug", __func__, + ctd64tree)); + } + /* + * This process should not produce errors, bugs notwithstanding. + * Just in case, latch any errors and attempt all re-insertions. + */ + error = tmperr ? tmperr : error; + remctds--; + } + + KASSERT(remctds == 0, ("%s: t-digest ARB@%p free list bug", __func__, + (is32bit ? (void *)ctd32tree : (void *)ctd64tree))); + + return (error); +} + +static inline int +stats_v1_vsd_tdgst_add(enum vsd_dtype vs_dtype, struct voistatdata_tdgst *tdgst, + s64q_t x, uint64_t weight, int attempt) +{ +#ifdef DIAGNOSTIC + char qstr[Q_MAXSTRLEN(x, 10)]; +#endif + struct ctdth32 *ctd32tree; + struct ctdth64 *ctd64tree; + void *closest, *cur, *lb, *ub; + struct voistatdata_tdgstctd32 *ctd32; + struct voistatdata_tdgstctd64 *ctd64; + uint64_t cnt, smplcnt, sum, tmpsum; + s64q_t k, minz, q, z; + int error, is32bit, n; + + error = 0; + minz = Q_INI(&z, 0, 0, Q_NFBITS(x)); + + switch (vs_dtype) { + case VSD_DTYPE_TDGSTCLUST32: + if ((UINT32_MAX - weight) < VSD(tdgstclust32, tdgst)->smplcnt) + error = EOVERFLOW; + smplcnt = VSD(tdgstclust32, tdgst)->smplcnt; + ctd32tree = &VSD(tdgstclust32, tdgst)->ctdtree; + is32bit = 1; + ctd64tree = NULL; + ctd64 = NULL; + break; + case VSD_DTYPE_TDGSTCLUST64: + if ((UINT64_MAX - weight) < VSD(tdgstclust64, tdgst)->smplcnt) + error = EOVERFLOW; + smplcnt = VSD(tdgstclust64, tdgst)->smplcnt; + ctd64tree = &VSD(tdgstclust64, tdgst)->ctdtree; + is32bit = 0; + ctd32tree = NULL; + ctd32 = NULL; + break; + default: + error = EINVAL; + break; + } + + if (error) + return (error); + + /* + * Inspired by Ted Dunning's AVLTreeDigest.java + */ + do { +#if defined(DIAGNOSTIC) + KASSERT(attempt < 5, + ("%s: Too many attempts", __func__)); +#endif + if (attempt >= 5) + return (EAGAIN); + + Q_SIFVAL(minz, Q_IFMAXVAL(minz)); + closest = ub = NULL; + sum = tmpsum = 0; + + if (is32bit) + lb = cur = (void *)(ctd32 = ARB_MIN(ctdth32, ctd32tree)); + else + lb = cur = (void *)(ctd64 = ARB_MIN(ctdth64, ctd64tree)); + + if (lb == NULL) /* Empty tree. */ + lb = (is32bit ? (void *)ARB_ROOT(ctd32tree) : + (void *)ARB_ROOT(ctd64tree)); + + /* + * Find the set of centroids with minimum distance to x and + * compute the sum of counts for all centroids with mean less + * than the first centroid in the set. + */ + for (; cur != NULL; + cur = (is32bit ? + (void *)(ctd32 = ARB_NEXT(ctdth32, ctd32tree, ctd32)) : + (void *)(ctd64 = ARB_NEXT(ctdth64, ctd64tree, ctd64)))) { + if (is32bit) { + cnt = ctd32->cnt; + KASSERT(Q_PRECEQ(ctd32->mu, x), + ("%s: Q_RELPREC(mu,x)=%d", __func__, + Q_RELPREC(ctd32->mu, x))); + /* Ok to assign as both have same precision. */ + z = ctd32->mu; + } else { + cnt = ctd64->cnt; + KASSERT(Q_PRECEQ(ctd64->mu, x), + ("%s: Q_RELPREC(mu,x)=%d", __func__, + Q_RELPREC(ctd64->mu, x))); + /* Ok to assign as both have same precision. */ + z = ctd64->mu; + } + + error = Q_QSUBQ(&z, x); +#if defined(DIAGNOSTIC) + KASSERT(!error, ("%s: unexpected error %d", __func__, + error)); +#endif + if (error) + return (error); + + z = Q_QABS(z); + if (Q_QLTQ(z, minz)) { + minz = z; + lb = cur; + sum = tmpsum; + tmpsum += cnt; + } else if (Q_QGTQ(z, minz)) { + ub = cur; + break; + } + } + + cur = (is32bit ? + (void *)(ctd32 = (struct voistatdata_tdgstctd32 *)lb) : + (void *)(ctd64 = (struct voistatdata_tdgstctd64 *)lb)); + + for (n = 0; cur != ub; cur = (is32bit ? + (void *)(ctd32 = ARB_NEXT(ctdth32, ctd32tree, ctd32)) : + (void *)(ctd64 = ARB_NEXT(ctdth64, ctd64tree, ctd64)))) { + if (is32bit) + cnt = ctd32->cnt; + else + cnt = ctd64->cnt; + + q = Q_CTRLINI(16); + if (smplcnt == 1) + error = Q_QFRACI(&q, 1, 2); + else + /* [ sum + ((cnt - 1) / 2) ] / (smplcnt - 1) */ + error = Q_QFRACI(&q, (sum << 1) + cnt - 1, + (smplcnt - 1) << 1); + k = q; + /* k = q x 4 x samplcnt x attempt */ + error |= Q_QMULI(&k, 4 * smplcnt * attempt); + /* k = k x (1 - q) */ + error |= Q_QSUBI(&q, 1); + q = Q_QABS(q); + error |= Q_QMULQ(&k, q); +#if defined(DIAGNOSTIC) +#if !defined(_KERNEL) + double q_dbl, k_dbl, q2d, k2d; + q2d = Q_Q2D(q); + k2d = Q_Q2D(k); + q_dbl = smplcnt == 1 ? 0.5 : + (sum + ((cnt - 1) / 2.0)) / (double)(smplcnt - 1); + k_dbl = 4 * smplcnt * q_dbl * (1.0 - q_dbl) * attempt; + /* + * If the difference between q and q_dbl is greater than + * the fractional precision of q, something is off. + * NB: q is holding the value of 1 - q + */ + q_dbl = 1.0 - q_dbl; + KASSERT((q_dbl > q2d ? q_dbl - q2d : q2d - q_dbl) < + (1.05 * ((double)1 / (double)(1ULL << Q_NFBITS(q)))), + ("Q-type q bad precision")); + KASSERT((k_dbl > k2d ? k_dbl - k2d : k2d - k_dbl) < + 1.0 + (0.01 * smplcnt), + ("Q-type k bad precision")); +#endif /* !_KERNEL */ + KASSERT(!error, ("%s: unexpected error %d", __func__, + error)); +#endif /* DIAGNOSTIC */ + if (error) + return (error); + if ((is32bit && ((ctd32->cnt + weight) <= + (uint64_t)Q_GIVAL(k))) || + (!is32bit && ((ctd64->cnt + weight) <= + (uint64_t)Q_GIVAL(k)))) { + n++; + /* random() produces 31 bits. */ + if (random() < (INT32_MAX / n)) + closest = cur; + } + sum += cnt; + } + } while (closest == NULL && + (is32bit ? ARB_FULL(ctd32tree) : ARB_FULL(ctd64tree)) && + (error = stats_v1_vsd_tdgst_compress(vs_dtype, tdgst, + attempt++)) == 0); + + if (error) + return (error); + + if (closest != NULL) { + /* Merge with an existing centroid. */ + if (is32bit) { + ctd32 = (struct voistatdata_tdgstctd32 *)closest; + error = Q_QSUBQ(&x, ctd32->mu); + error = error ? error : + Q_QDIVI(&x, ctd32->cnt + weight); + if (error || (error = Q_QADDQ(&ctd32->mu, x))) { +#ifdef DIAGNOSTIC + KASSERT(!error, ("%s: unexpected error %d", + __func__, error)); +#endif + return (error); + } + ctd32->cnt += weight; + error = ARB_REINSERT(ctdth32, ctd32tree, ctd32) == + NULL ? 0 : EALREADY; +#ifdef DIAGNOSTIC + RB_REINSERT(rbctdth32, + &VSD(tdgstclust32, tdgst)->rbctdtree, ctd32); +#endif + } else { + ctd64 = (struct voistatdata_tdgstctd64 *)closest; + error = Q_QSUBQ(&x, ctd64->mu); + error = error ? error : + Q_QDIVI(&x, ctd64->cnt + weight); + if (error || (error = Q_QADDQ(&ctd64->mu, x))) { + KASSERT(!error, ("%s: unexpected error %d", + __func__, error)); + return (error); + } + ctd64->cnt += weight; + error = ARB_REINSERT(ctdth64, ctd64tree, ctd64) == + NULL ? 0 : EALREADY; +#ifdef DIAGNOSTIC + RB_REINSERT(rbctdth64, + &VSD(tdgstclust64, tdgst)->rbctdtree, ctd64); +#endif + } + } else { + /* + * Add a new centroid. If digest compression is working + * correctly, there should always be at least one free. + */ + if (is32bit) { + ctd32 = ARB_GETFREE(ctd32tree, ctdlnk); +#ifdef DIAGNOSTIC + KASSERT(ctd32 != NULL, + ("%s: t-digest@%p has no free centroids", + __func__, tdgst)); +#endif + if (ctd32 == NULL) + return (EAGAIN); + if ((error = Q_QCPYVALQ(&ctd32->mu, x))) + return (error); + ctd32->cnt = weight; + error = ARB_INSERT(ctdth32, ctd32tree, ctd32) == NULL ? + 0 : EALREADY; +#ifdef DIAGNOSTIC + RB_INSERT(rbctdth32, + &VSD(tdgstclust32, tdgst)->rbctdtree, ctd32); +#endif + } else { + ctd64 = ARB_GETFREE(ctd64tree, ctdlnk); +#ifdef DIAGNOSTIC + KASSERT(ctd64 != NULL, + ("%s: t-digest@%p has no free centroids", + __func__, tdgst)); +#endif + if (ctd64 == NULL) /* Should not happen. */ + return (EAGAIN); + /* Direct assignment ok as both have same type/prec. */ + ctd64->mu = x; + ctd64->cnt = weight; + error = ARB_INSERT(ctdth64, ctd64tree, ctd64) == NULL ? + 0 : EALREADY; +#ifdef DIAGNOSTIC + RB_INSERT(rbctdth64, &VSD(tdgstclust64, + tdgst)->rbctdtree, ctd64); +#endif + } + } + + if (is32bit) + VSD(tdgstclust32, tdgst)->smplcnt += weight; + else { + VSD(tdgstclust64, tdgst)->smplcnt += weight; + +#ifdef DIAGNOSTIC + struct rbctdth64 *rbctdtree = + &VSD(tdgstclust64, tdgst)->rbctdtree; + struct voistatdata_tdgstctd64 *rbctd64; + int i = 0; + ARB_FOREACH(ctd64, ctdth64, ctd64tree) { + rbctd64 = (i == 0 ? RB_MIN(rbctdth64, rbctdtree) : + RB_NEXT(rbctdth64, rbctdtree, rbctd64)); + + if (i >= ARB_CURNODES(ctd64tree) + || ctd64 != rbctd64 + || ARB_MIN(ctdth64, ctd64tree) != + RB_MIN(rbctdth64, rbctdtree) + || ARB_MAX(ctdth64, ctd64tree) != + RB_MAX(rbctdth64, rbctdtree) + || ARB_LEFTIDX(ctd64, ctdlnk) != + ARB_SELFIDX(ctd64tree, RB_LEFT(rbctd64, rblnk)) + || ARB_RIGHTIDX(ctd64, ctdlnk) != + ARB_SELFIDX(ctd64tree, RB_RIGHT(rbctd64, rblnk)) + || ARB_PARENTIDX(ctd64, ctdlnk) != + ARB_SELFIDX(ctd64tree, + RB_PARENT(rbctd64, rblnk))) { + Q_TOSTR(ctd64->mu, -1, 10, qstr, sizeof(qstr)); + printf("ARB ctd=%3d p=%3d l=%3d r=%3d c=%2d " + "mu=%s\n", + (int)ARB_SELFIDX(ctd64tree, ctd64), + ARB_PARENTIDX(ctd64, ctdlnk), + ARB_LEFTIDX(ctd64, ctdlnk), + ARB_RIGHTIDX(ctd64, ctdlnk), + ARB_COLOR(ctd64, ctdlnk), + qstr); + + Q_TOSTR(rbctd64->mu, -1, 10, qstr, + sizeof(qstr)); + printf(" RB ctd=%3d p=%3d l=%3d r=%3d c=%2d " + "mu=%s\n", + (int)ARB_SELFIDX(ctd64tree, rbctd64), + (int)ARB_SELFIDX(ctd64tree, + RB_PARENT(rbctd64, rblnk)), + (int)ARB_SELFIDX(ctd64tree, + RB_LEFT(rbctd64, rblnk)), + (int)ARB_SELFIDX(ctd64tree, + RB_RIGHT(rbctd64, rblnk)), + RB_COLOR(rbctd64, rblnk), + qstr); + + panic("RB@%p and ARB@%p trees differ\n", + rbctdtree, ctd64tree); + } + i++; + } +#endif /* DIAGNOSTIC */ + } + + return (error); +} + +static inline int +stats_v1_voi_update_tdgst(enum vsd_dtype voi_dtype, struct voistatdata *voival, + struct voistat *vs, struct voistatdata_tdgst *tdgst) +{ + s64q_t x; + int error; + + error = 0; + + switch (vs->dtype) { + case VSD_DTYPE_TDGSTCLUST32: + /* Use same precision as the user's centroids. */ + Q_INI(&x, 0, 0, Q_NFBITS( + ARB_CNODE(&VSD(tdgstclust32, tdgst)->ctdtree, 0)->mu)); + break; + case VSD_DTYPE_TDGSTCLUST64: + /* Use same precision as the user's centroids. */ + Q_INI(&x, 0, 0, Q_NFBITS( + ARB_CNODE(&VSD(tdgstclust64, tdgst)->ctdtree, 0)->mu)); + break; + default: + KASSERT(vs->dtype == VSD_DTYPE_TDGSTCLUST32 || + vs->dtype == VSD_DTYPE_TDGSTCLUST64, + ("%s: vs->dtype(%d) != VSD_DTYPE_TDGSTCLUST<32|64>", + __func__, vs->dtype)); + return (EINVAL); + } + + /* + * XXXLAS: Should have both a signed and unsigned 'x' variable to avoid + * returning EOVERFLOW if the voival would have fit in a u64q_t. + */ + switch (voi_dtype) { + case VSD_DTYPE_INT_S32: + error = Q_QCPYVALI(&x, voival->int32.s32); + break; + case VSD_DTYPE_INT_U32: + error = Q_QCPYVALI(&x, voival->int32.u32); + break; + case VSD_DTYPE_INT_S64: + error = Q_QCPYVALI(&x, voival->int64.s64); + break; + case VSD_DTYPE_INT_U64: + error = Q_QCPYVALI(&x, voival->int64.u64); + break; + case VSD_DTYPE_INT_SLONG: + error = Q_QCPYVALI(&x, voival->intlong.slong); + break; + case VSD_DTYPE_INT_ULONG: + error = Q_QCPYVALI(&x, voival->intlong.ulong); + break; + case VSD_DTYPE_Q_S32: + error = Q_QCPYVALQ(&x, voival->q32.sq32); + break; + case VSD_DTYPE_Q_U32: + error = Q_QCPYVALQ(&x, voival->q32.uq32); + break; + case VSD_DTYPE_Q_S64: + error = Q_QCPYVALQ(&x, voival->q64.sq64); + break; + case VSD_DTYPE_Q_U64: + error = Q_QCPYVALQ(&x, voival->q64.uq64); + break; + default: + error = EINVAL; + break; + } + + if (error || + (error = stats_v1_vsd_tdgst_add(vs->dtype, tdgst, x, 1, 1))) + return (error); + + vs->flags |= VS_VSDVALID; + return (0); +} + +int +stats_v1_voi_update(struct statsblobv1 *sb, int32_t voi_id, + enum vsd_dtype voi_dtype, struct voistatdata *voival, uint32_t flags) +{ + struct voi *v; + struct voistat *vs; + void *statevsd, *vsd; + int error, i, tmperr; + + error = 0; + + if (sb == NULL || sb->abi != STATS_ABI_V1 || voi_id >= NVOIS(sb) || + voi_dtype == 0 || voi_dtype >= VSD_NUM_DTYPES || voival == NULL) + return (EINVAL); + v = &sb->vois[voi_id]; + if (voi_dtype != v->dtype || v->id < 0 || + ((flags & SB_VOI_RELUPDATE) && !(v->flags & VOI_REQSTATE))) + return (EINVAL); + + vs = BLOB_OFFSET(sb, v->stats_off); + if (v->flags & VOI_REQSTATE) + statevsd = BLOB_OFFSET(sb, vs->data_off); + else + statevsd = NULL; + + if (flags & SB_VOI_RELUPDATE) { + switch (voi_dtype) { + case VSD_DTYPE_INT_S32: + voival->int32.s32 += + VSD(voistate, statevsd)->prev.int32.s32; + break; + case VSD_DTYPE_INT_U32: + voival->int32.u32 += + VSD(voistate, statevsd)->prev.int32.u32; + break; + case VSD_DTYPE_INT_S64: + voival->int64.s64 += + VSD(voistate, statevsd)->prev.int64.s64; + break; + case VSD_DTYPE_INT_U64: + voival->int64.u64 += + VSD(voistate, statevsd)->prev.int64.u64; + break; + case VSD_DTYPE_INT_SLONG: + voival->intlong.slong += + VSD(voistate, statevsd)->prev.intlong.slong; + break; + case VSD_DTYPE_INT_ULONG: + voival->intlong.ulong += + VSD(voistate, statevsd)->prev.intlong.ulong; + break; + case VSD_DTYPE_Q_S32: + error = Q_QADDQ(&voival->q32.sq32, + VSD(voistate, statevsd)->prev.q32.sq32); + break; + case VSD_DTYPE_Q_U32: + error = Q_QADDQ(&voival->q32.uq32, + VSD(voistate, statevsd)->prev.q32.uq32); + break; + case VSD_DTYPE_Q_S64: + error = Q_QADDQ(&voival->q64.sq64, + VSD(voistate, statevsd)->prev.q64.sq64); + break; + case VSD_DTYPE_Q_U64: + error = Q_QADDQ(&voival->q64.uq64, + VSD(voistate, statevsd)->prev.q64.uq64); + break; + default: + KASSERT(0, ("Unknown VOI data type %d", voi_dtype)); + break; + } + } + + if (error) + return (error); + + for (i = v->voistatmaxid; i > 0; i--) { + vs = &((struct voistat *)BLOB_OFFSET(sb, v->stats_off))[i]; + if (vs->stype < 0) + continue; + + vsd = BLOB_OFFSET(sb, vs->data_off); + + switch (vs->stype) { + case VS_STYPE_MAX: + tmperr = stats_v1_voi_update_max(voi_dtype, voival, + vs, vsd); + break; + case VS_STYPE_MIN: + tmperr = stats_v1_voi_update_min(voi_dtype, voival, + vs, vsd); + break; + case VS_STYPE_SUM: + tmperr = stats_v1_voi_update_sum(voi_dtype, voival, + vs, vsd); + break; + case VS_STYPE_HIST: + tmperr = stats_v1_voi_update_hist(voi_dtype, voival, + vs, vsd); + break; + case VS_STYPE_TDGST: + tmperr = stats_v1_voi_update_tdgst(voi_dtype, voival, + vs, vsd); + break; + default: + KASSERT(0, ("Unknown VOI stat type %d", vs->stype)); + break; + } + + if (tmperr) { + error = tmperr; + VS_INCERRS(vs); + } + } + + if (statevsd) { + switch (voi_dtype) { + case VSD_DTYPE_INT_S32: + VSD(voistate, statevsd)->prev.int32.s32 = + voival->int32.s32; + break; + case VSD_DTYPE_INT_U32: + VSD(voistate, statevsd)->prev.int32.u32 = + voival->int32.u32; + break; + case VSD_DTYPE_INT_S64: + VSD(voistate, statevsd)->prev.int64.s64 = + voival->int64.s64; + break; + case VSD_DTYPE_INT_U64: + VSD(voistate, statevsd)->prev.int64.u64 = + voival->int64.u64; + break; + case VSD_DTYPE_INT_SLONG: + VSD(voistate, statevsd)->prev.intlong.slong = + voival->intlong.slong; + break; + case VSD_DTYPE_INT_ULONG: + VSD(voistate, statevsd)->prev.intlong.ulong = + voival->intlong.ulong; + break; + case VSD_DTYPE_Q_S32: + error = Q_QCPYVALQ( + &VSD(voistate, statevsd)->prev.q32.sq32, + voival->q32.sq32); + break; + case VSD_DTYPE_Q_U32: + error = Q_QCPYVALQ( + &VSD(voistate, statevsd)->prev.q32.uq32, + voival->q32.uq32); + break; + case VSD_DTYPE_Q_S64: + error = Q_QCPYVALQ( + &VSD(voistate, statevsd)->prev.q64.sq64, + voival->q64.sq64); + break; + case VSD_DTYPE_Q_U64: + error = Q_QCPYVALQ( + &VSD(voistate, statevsd)->prev.q64.uq64, + voival->q64.uq64); + break; + default: + KASSERT(0, ("Unknown VOI data type %d", voi_dtype)); + break; + } + } + + return (error); +} + +#ifdef _KERNEL + +static void +stats_init(void *arg) +{ + +} +SYSINIT(stats, SI_SUB_KDTRACE, SI_ORDER_FIRST, stats_init, NULL); + +/* + * Sysctl handler to display the list of available stats templates. + */ +static int +stats_tpl_list_available(SYSCTL_HANDLER_ARGS) +{ + struct sbuf *s; + int err, i; + + err = 0; + + /* We can tolerate ntpl being stale, so do not take the lock. */ + s = sbuf_new(NULL, NULL, /* +1 per tpl for , */ + ntpl * (STATS_TPL_MAX_STR_SPEC_LEN + 1), SBUF_FIXEDLEN); + if (s == NULL) + return (ENOMEM); + + TPL_LIST_RLOCK(); + for (i = 0; i < ntpl; i++) { + err = sbuf_printf(s, "%s\"%s\":%u", i ? "," : "", + tpllist[i]->mb->tplname, tpllist[i]->mb->tplhash); + if (err) { + /* Sbuf overflow condition. */ + err = EOVERFLOW; + break; + } + } + TPL_LIST_RUNLOCK(); + + if (!err) { + sbuf_finish(s); + err = sysctl_handle_string(oidp, sbuf_data(s), 0, req); + } + + sbuf_delete(s); + return (err); +} + +/* + * Called by subsystem-specific sysctls to report and/or parse the list of + * templates being sampled and their sampling rates. A stats_tpl_sr_cb_t + * conformant function pointer must be passed in as arg1, which is used to + * interact with the subsystem's stats template sample rates list. If arg2 > 0, + * a zero-initialised allocation of arg2-sized contextual memory is + * heap-allocated and passed in to all subsystem callbacks made during the + * operation of stats_tpl_sample_rates(). + * + * XXXLAS: Assumes templates are never removed, which is currently true but may + * need to be reworked in future if dynamic template management becomes a + * requirement e.g. to support kernel module based templates. + */ +int +stats_tpl_sample_rates(SYSCTL_HANDLER_ARGS) +{ + char kvpair_fmt[16], tplspec_fmt[16]; + char tpl_spec[STATS_TPL_MAX_STR_SPEC_LEN]; + char tpl_name[TPL_MAX_NAME_LEN + 2]; /* +2 for "" */ + stats_tpl_sr_cb_t subsys_cb; + void *subsys_ctx; + char *buf, *new_rates_usr_str, *tpl_name_p; + struct stats_tpl_sample_rate *rates; + struct sbuf *s, _s; + uint32_t cum_pct, pct, tpl_hash; + int err, i, off, len, newlen, nrates; + + buf = NULL; + rates = NULL; + err = nrates = 0; + subsys_cb = (stats_tpl_sr_cb_t)arg1; + KASSERT(subsys_cb != NULL, ("%s: subsys_cb == arg1 == NULL", __func__)); + if (arg2 > 0) + subsys_ctx = malloc(arg2, M_TEMP, M_WAITOK | M_ZERO); + else + subsys_ctx = NULL; + + /* Grab current count of subsystem rates. */ + err = subsys_cb(TPL_SR_UNLOCKED_GET, NULL, &nrates, subsys_ctx); + if (err) + goto done; + + /* +1 to ensure we can append '\0' post copyin, +5 per rate for =nnn, */ + len = max(req->newlen + 1, nrates * (STATS_TPL_MAX_STR_SPEC_LEN + 5)); + + if (req->oldptr != NULL || req->newptr != NULL) + buf = malloc(len, M_TEMP, M_WAITOK); + + if (req->oldptr != NULL) { + if (nrates == 0) { + /* No rates, so return an empty string via oldptr. */ + err = SYSCTL_OUT(req, "", 1); + if (err) + goto done; + goto process_new; + } + + s = sbuf_new(&_s, buf, len, SBUF_FIXEDLEN | SBUF_INCLUDENUL); + + /* Grab locked count of, and ptr to, subsystem rates. */ + err = subsys_cb(TPL_SR_RLOCKED_GET, &rates, &nrates, + subsys_ctx); + if (err) + goto done; + TPL_LIST_RLOCK(); + for (i = 0; i < nrates && !err; i++) { + err = sbuf_printf(s, "%s\"%s\":%u=%u", i ? "," : "", + tpllist[rates[i].tpl_slot_id]->mb->tplname, + tpllist[rates[i].tpl_slot_id]->mb->tplhash, + rates[i].tpl_sample_pct); + } + TPL_LIST_RUNLOCK(); + /* Tell subsystem that we're done with its rates list. */ + err = subsys_cb(TPL_SR_RUNLOCK, &rates, &nrates, subsys_ctx); + if (err) + goto done; + + err = sbuf_finish(s); + if (err) + goto done; /* We lost a race for buf to be too small. */ + + /* Return the rendered string data via oldptr. */ + err = SYSCTL_OUT(req, sbuf_data(s), sbuf_len(s)); + } else { + /* Return the upper bound size for buffer sizing requests. */ + err = SYSCTL_OUT(req, NULL, len); + } + +process_new: + if (err || req->newptr == NULL) + goto done; + + newlen = req->newlen - req->newidx; + err = SYSCTL_IN(req, buf, newlen); + if (err) + goto done; + + /* + * Initialise format strings at run time. + * + * Write the max template spec string length into the + * template_spec=percent key-value pair parsing format string as: + * " %[^=]=%u %n" + * + * Write the max template name string length into the tplname:tplhash + * parsing format string as: + * "%[^:]:%u" + * + * Subtract 1 for \0 appended by sscanf(). + */ + sprintf(kvpair_fmt, " %%%zu[^=]=%%u %%n", sizeof(tpl_spec) - 1); + sprintf(tplspec_fmt, "%%%zu[^:]:%%u", sizeof(tpl_name) - 1); + + /* + * Parse each CSV key-value pair specifying a template and its sample + * percentage. Whitespace either side of a key-value pair is ignored. + * Templates can be specified by name, hash, or name and hash per the + * following formats (chars in [] are optional): + * ["]["]= + * :hash=pct + * ["]["]:hash= + */ + cum_pct = nrates = 0; + rates = NULL; + buf[newlen] = '\0'; /* buf is at least newlen+1 in size. */ + new_rates_usr_str = buf; + while (isspace(*new_rates_usr_str)) + new_rates_usr_str++; /* Skip leading whitespace. */ + while (*new_rates_usr_str != '\0') { + tpl_name_p = tpl_name; + tpl_name[0] = '\0'; + tpl_hash = 0; + off = 0; + + /* + * Parse key-value pair which must perform 2 conversions, then + * parse the template spec to extract either name, hash, or name + * and hash depending on the three possible spec formats. The + * tplspec_fmt format specifier parses name or name and hash + * template specs, while the ":%u" format specifier parses + * hash-only template specs. If parsing is successfull, ensure + * the cumulative sampling percentage does not exceed 100. + */ + err = EINVAL; + if (2 != sscanf(new_rates_usr_str, kvpair_fmt, tpl_spec, &pct, + &off)) + break; + if ((1 > sscanf(tpl_spec, tplspec_fmt, tpl_name, &tpl_hash)) && + (1 != sscanf(tpl_spec, ":%u", &tpl_hash))) + break; + if ((cum_pct += pct) > 100) + break; + err = 0; + + /* Strip surrounding "" from template name if present. */ + len = strlen(tpl_name); + if (len > 0) { + if (tpl_name[len - 1] == '"') + tpl_name[--len] = '\0'; + if (tpl_name[0] == '"') { + tpl_name_p++; + len--; + } + } + + rates = stats_realloc(rates, 0, /* oldsz is unused in kernel. */ + (nrates + 1) * sizeof(*rates), M_WAITOK); + rates[nrates].tpl_slot_id = + stats_tpl_fetch_allocid(len ? tpl_name_p : NULL, tpl_hash); + if (rates[nrates].tpl_slot_id < 0) { + err = -rates[nrates].tpl_slot_id; + break; + } + rates[nrates].tpl_sample_pct = pct; + nrates++; + new_rates_usr_str += off; + if (*new_rates_usr_str != ',') + break; /* End-of-input or malformed. */ + new_rates_usr_str++; /* Move past comma to next pair. */ + } + + if (!err) { + if ((new_rates_usr_str - buf) < newlen) { + /* Entire input has not been consumed. */ + err = EINVAL; + } else { + /* + * Give subsystem the new rates. They'll return the + * appropriate rates pointer for us to garbage collect. + */ + err = subsys_cb(TPL_SR_PUT, &rates, &nrates, + subsys_ctx); + } + } + stats_free(rates); + +done: + free(buf, M_TEMP); + free(subsys_ctx, M_TEMP); + return (err); +} + +SYSCTL_NODE(_kern, OID_AUTO, stats, CTLFLAG_RW, NULL, + "stats(9) MIB"); + +SYSCTL_PROC(_kern_stats, OID_AUTO, templates, CTLTYPE_STRING|CTLFLAG_RD, + NULL, 0, stats_tpl_list_available, "A", + "list the name/hash of all available stats(9) templates"); + +#else /* ! _KERNEL */ + +static void __attribute__ ((constructor)) +stats_constructor(void) +{ + + pthread_rwlock_init(&tpllistlock, NULL); +} + +static void __attribute__ ((destructor)) +stats_destructor(void) +{ + + pthread_rwlock_destroy(&tpllistlock); +} + +#endif /* _KERNEL */ Property changes on: head/sys/kern/subr_stats.c ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/sys/sys/arb.h =================================================================== --- head/sys/sys/arb.h (revision 353282) +++ head/sys/sys/arb.h (revision 353283) @@ -1,779 +1,782 @@ /* $NetBSD: tree.h,v 1.8 2004/03/28 19:38:30 provos Exp $ */ /* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */ /* $FreeBSD$ */ /*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright 2002 Niels Provos * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SYS_ARB_H_ #define _SYS_ARB_H_ #include /* Array-based red-black trees. */ #define ARB_NULLIDX -1 #define ARB_NULLCOL -1 #define ARB_BLACK 0 #define ARB_RED 1 #define ARB_NEGINF -1 #define ARB_INF 1 #define ARB_HEAD(name, type, idxbits) \ struct name { \ int##idxbits##_t arb_curnodes; \ int##idxbits##_t arb_maxnodes; \ int##idxbits##_t arb_root_idx; \ int##idxbits##_t arb_free_idx; \ int##idxbits##_t arb_min_idx; \ int##idxbits##_t arb_max_idx; \ struct type arb_nodes[]; \ } #define ARB8_HEAD(name, type) ARB_HEAD(name, type, 8) #define ARB16_HEAD(name, type) ARB_HEAD(name, type, 16) #define ARB32_HEAD(name, type) ARB_HEAD(name, type, 32) #define ARB_ALLOCSIZE(head, maxn, x) \ (sizeof(*head) + (maxn) * sizeof(*x)) #define ARB_INITIALIZER(name, maxn) \ ((struct name){ 0, maxn, ARB_NULLIDX, ARB_NULLIDX, \ ARB_NULLIDX, ARB_NULLIDX }) #define ARB_INIT(x, field, head, maxn) \ (head)->arb_curnodes = 0; \ (head)->arb_maxnodes = (maxn); \ (head)->arb_root_idx = (head)->arb_free_idx = \ (head)->arb_min_idx = (head)->arb_max_idx = ARB_NULLIDX; \ /* The ARB_RETURNFREE() puts all entries on the free list. */ \ ARB_ARRFOREACH_REVWCOND(x, field, head, \ ARB_RETURNFREE(head, x, field)) #define ARB_ENTRY(idxbits) \ struct { \ int##idxbits##_t arbe_parent_idx; \ int##idxbits##_t arbe_left_idx; \ int##idxbits##_t arbe_right_idx; \ int8_t arbe_color; \ } #define ARB8_ENTRY() ARB_ENTRY(8) #define ARB16_ENTRY() ARB_ENTRY(16) #define ARB32_ENTRY() ARB_ENTRY(32) #define ARB_ENTRYINIT(elm, field) do { \ (elm)->field.arbe_parent_idx = \ (elm)->field.arbe_left_idx = \ (elm)->field.arbe_right_idx = ARB_NULLIDX; \ (elm)->field.arbe_color = ARB_NULLCOL; \ } while (/*CONSTCOND*/ 0) #define ARB_ELMTYPE(head) __typeof(&(head)->arb_nodes[0]) #define ARB_NODES(head) (head)->arb_nodes #define ARB_MAXNODES(head) (head)->arb_maxnodes #define ARB_CURNODES(head) (head)->arb_curnodes #define ARB_EMPTY(head) ((head)->arb_curnodes == 0) #define ARB_FULL(head) ((head)->arb_curnodes >= (head)->arb_maxnodes) #define ARB_CNODE(head, idx) \ ((((intptr_t)(idx) <= ARB_NULLIDX) || ((idx) >= ARB_MAXNODES(head))) ? \ NULL : ((const ARB_ELMTYPE(head))(ARB_NODES(head) + (idx)))) #define ARB_NODE(head, idx) \ (__DECONST(ARB_ELMTYPE(head), ARB_CNODE(head, idx))) #define ARB_ROOT(head) ARB_NODE(head, ARB_ROOTIDX(head)) #define ARB_LEFT(head, elm, field) ARB_NODE(head, ARB_LEFTIDX(elm, field)) #define ARB_RIGHT(head, elm, field) ARB_NODE(head, ARB_RIGHTIDX(elm, field)) #define ARB_PARENT(head, elm, field) ARB_NODE(head, ARB_PARENTIDX(elm, field)) #define ARB_FREEIDX(head) (head)->arb_free_idx #define ARB_ROOTIDX(head) (head)->arb_root_idx #define ARB_MINIDX(head) (head)->arb_min_idx #define ARB_MAXIDX(head) (head)->arb_max_idx #define ARB_SELFIDX(head, elm) \ ((elm) ? ((intptr_t)((((const uint8_t *)(elm)) - \ ((const uint8_t *)ARB_NODES(head))) / sizeof(*(elm)))) : \ (intptr_t)ARB_NULLIDX) #define ARB_LEFTIDX(elm, field) (elm)->field.arbe_left_idx #define ARB_RIGHTIDX(elm, field) (elm)->field.arbe_right_idx #define ARB_PARENTIDX(elm, field) (elm)->field.arbe_parent_idx #define ARB_COLOR(elm, field) (elm)->field.arbe_color #define ARB_PREVFREE(head, elm, field) \ ARB_NODE(head, ARB_PREVFREEIDX(elm, field)) #define ARB_PREVFREEIDX(elm, field) ARB_LEFTIDX(elm, field) #define ARB_NEXTFREE(head, elm, field) \ ARB_NODE(head, ARB_NEXTFREEIDX(elm, field)) #define ARB_NEXTFREEIDX(elm, field) ARB_RIGHTIDX(elm, field) #define ARB_ISFREE(elm, field) (ARB_COLOR(elm, field) == ARB_NULLCOL) #define ARB_SET(head, elm, parent, field) do { \ ARB_PARENTIDX(elm, field) = \ parent ? ARB_SELFIDX(head, parent) : ARB_NULLIDX; \ ARB_LEFTIDX(elm, field) = ARB_RIGHTIDX(elm, field) = ARB_NULLIDX; \ ARB_COLOR(elm, field) = ARB_RED; \ } while (/*CONSTCOND*/ 0) #define ARB_SET_BLACKRED(black, red, field) do { \ ARB_COLOR(black, field) = ARB_BLACK; \ ARB_COLOR(red, field) = ARB_RED; \ } while (/*CONSTCOND*/ 0) #ifndef ARB_AUGMENT #define ARB_AUGMENT(x) do {} while (0) #endif #define ARB_ROTATE_LEFT(head, elm, tmp, field) do { \ __typeof(ARB_RIGHTIDX(elm, field)) _tmpidx; \ (tmp) = ARB_RIGHT(head, elm, field); \ _tmpidx = ARB_RIGHTIDX(elm, field); \ ARB_RIGHTIDX(elm, field) = ARB_LEFTIDX(tmp, field); \ if (ARB_RIGHTIDX(elm, field) != ARB_NULLIDX) { \ ARB_PARENTIDX(ARB_LEFT(head, tmp, field), field) = \ ARB_SELFIDX(head, elm); \ } \ ARB_AUGMENT(elm); \ ARB_PARENTIDX(tmp, field) = ARB_PARENTIDX(elm, field); \ if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) { \ if (ARB_SELFIDX(head, elm) == \ ARB_LEFTIDX(ARB_PARENT(head, elm, field), field)) \ ARB_LEFTIDX(ARB_PARENT(head, elm, field), \ field) = _tmpidx; \ else \ ARB_RIGHTIDX(ARB_PARENT(head, elm, field), \ field) = _tmpidx; \ } else \ ARB_ROOTIDX(head) = _tmpidx; \ ARB_LEFTIDX(tmp, field) = ARB_SELFIDX(head, elm); \ ARB_PARENTIDX(elm, field) = _tmpidx; \ ARB_AUGMENT(tmp); \ if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) \ ARB_AUGMENT(ARB_PARENT(head, tmp, field)); \ } while (/*CONSTCOND*/ 0) #define ARB_ROTATE_RIGHT(head, elm, tmp, field) do { \ __typeof(ARB_LEFTIDX(elm, field)) _tmpidx; \ (tmp) = ARB_LEFT(head, elm, field); \ _tmpidx = ARB_LEFTIDX(elm, field); \ ARB_LEFTIDX(elm, field) = ARB_RIGHTIDX(tmp, field); \ if (ARB_LEFTIDX(elm, field) != ARB_NULLIDX) { \ ARB_PARENTIDX(ARB_RIGHT(head, tmp, field), field) = \ ARB_SELFIDX(head, elm); \ } \ ARB_AUGMENT(elm); \ ARB_PARENTIDX(tmp, field) = ARB_PARENTIDX(elm, field); \ if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) { \ if (ARB_SELFIDX(head, elm) == \ ARB_LEFTIDX(ARB_PARENT(head, elm, field), field)) \ ARB_LEFTIDX(ARB_PARENT(head, elm, field), \ field) = _tmpidx; \ else \ ARB_RIGHTIDX(ARB_PARENT(head, elm, field), \ field) = _tmpidx; \ } else \ ARB_ROOTIDX(head) = _tmpidx; \ ARB_RIGHTIDX(tmp, field) = ARB_SELFIDX(head, elm); \ ARB_PARENTIDX(elm, field) = _tmpidx; \ ARB_AUGMENT(tmp); \ if (ARB_PARENTIDX(tmp, field) != ARB_NULLIDX) \ ARB_AUGMENT(ARB_PARENT(head, tmp, field)); \ } while (/*CONSTCOND*/ 0) #define ARB_RETURNFREE(head, elm, field) \ ({ \ ARB_COLOR(elm, field) = ARB_NULLCOL; \ ARB_NEXTFREEIDX(elm, field) = ARB_FREEIDX(head); \ ARB_FREEIDX(head) = ARB_SELFIDX(head, elm); \ elm; \ }) #define ARB_GETFREEAT(head, field, fidx) \ ({ \ __typeof(ARB_NODE(head, 0)) _elm, _prevelm; \ int _idx = fidx; \ if (ARB_FREEIDX(head) == ARB_NULLIDX && !ARB_FULL(head)) { \ /* Populate the free list. */ \ ARB_ARRFOREACH_REVERSE(_elm, field, head) { \ if (ARB_ISFREE(_elm, field)) \ ARB_RETURNFREE(head, _elm, field); \ } \ } \ _elm = _prevelm = ARB_NODE(head, ARB_FREEIDX(head)); \ for (; _idx > 0 && _elm != NULL; _idx--, _prevelm = _elm) \ _elm = ARB_NODE(head, ARB_NEXTFREEIDX(_elm, field)); \ if (_elm) { \ if (fidx == 0) \ ARB_FREEIDX(head) = \ ARB_NEXTFREEIDX(_elm, field); \ else \ ARB_NEXTFREEIDX(_prevelm, field) = \ ARB_NEXTFREEIDX(_elm, field); \ } \ _elm; \ }) #define ARB_GETFREE(head, field) ARB_GETFREEAT(head, field, 0) /* Generates prototypes and inline functions */ #define ARB_PROTOTYPE(name, type, field, cmp) \ ARB_PROTOTYPE_INTERNAL(name, type, field, cmp,) #define ARB_PROTOTYPE_STATIC(name, type, field, cmp) \ ARB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) #define ARB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ ARB_PROTOTYPE_INSERT_COLOR(name, type, attr); \ ARB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \ ARB_PROTOTYPE_INSERT(name, type, attr); \ ARB_PROTOTYPE_REMOVE(name, type, attr); \ ARB_PROTOTYPE_CFIND(name, type, attr); \ ARB_PROTOTYPE_FIND(name, type, attr); \ ARB_PROTOTYPE_NFIND(name, type, attr); \ ARB_PROTOTYPE_CNEXT(name, type, attr); \ ARB_PROTOTYPE_NEXT(name, type, attr); \ ARB_PROTOTYPE_CPREV(name, type, attr); \ ARB_PROTOTYPE_PREV(name, type, attr); \ ARB_PROTOTYPE_CMINMAX(name, type, attr); \ ARB_PROTOTYPE_MINMAX(name, type, attr); \ ARB_PROTOTYPE_REINSERT(name, type, attr); #define ARB_PROTOTYPE_INSERT_COLOR(name, type, attr) \ attr void name##_ARB_INSERT_COLOR(struct name *, struct type *) #define ARB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \ attr void name##_ARB_REMOVE_COLOR(struct name *, struct type *, struct type *) #define ARB_PROTOTYPE_REMOVE(name, type, attr) \ attr struct type *name##_ARB_REMOVE(struct name *, struct type *) #define ARB_PROTOTYPE_INSERT(name, type, attr) \ attr struct type *name##_ARB_INSERT(struct name *, struct type *) #define ARB_PROTOTYPE_CFIND(name, type, attr) \ attr const struct type *name##_ARB_CFIND(const struct name *, \ const struct type *) #define ARB_PROTOTYPE_FIND(name, type, attr) \ attr struct type *name##_ARB_FIND(const struct name *, \ const struct type *) #define ARB_PROTOTYPE_NFIND(name, type, attr) \ attr struct type *name##_ARB_NFIND(struct name *, struct type *) #define ARB_PROTOTYPE_CNFIND(name, type, attr) \ attr const struct type *name##_ARB_CNFIND(const struct name *, \ const struct type *) #define ARB_PROTOTYPE_CNEXT(name, type, attr) \ attr const struct type *name##_ARB_CNEXT(const struct name *head,\ const struct type *) #define ARB_PROTOTYPE_NEXT(name, type, attr) \ attr struct type *name##_ARB_NEXT(const struct name *, \ const struct type *) #define ARB_PROTOTYPE_CPREV(name, type, attr) \ attr const struct type *name##_ARB_CPREV(const struct name *, \ const struct type *) #define ARB_PROTOTYPE_PREV(name, type, attr) \ attr struct type *name##_ARB_PREV(const struct name *, \ const struct type *) #define ARB_PROTOTYPE_CMINMAX(name, type, attr) \ attr const struct type *name##_ARB_CMINMAX(const struct name *, int) #define ARB_PROTOTYPE_MINMAX(name, type, attr) \ attr struct type *name##_ARB_MINMAX(const struct name *, int) #define ARB_PROTOTYPE_REINSERT(name, type, attr) \ attr struct type *name##_ARB_REINSERT(struct name *, struct type *) #define ARB_GENERATE(name, type, field, cmp) \ ARB_GENERATE_INTERNAL(name, type, field, cmp,) #define ARB_GENERATE_STATIC(name, type, field, cmp) \ ARB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) #define ARB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ ARB_GENERATE_INSERT_COLOR(name, type, field, attr) \ ARB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ ARB_GENERATE_INSERT(name, type, field, cmp, attr) \ ARB_GENERATE_REMOVE(name, type, field, attr) \ ARB_GENERATE_CFIND(name, type, field, cmp, attr) \ ARB_GENERATE_FIND(name, type, field, cmp, attr) \ ARB_GENERATE_CNEXT(name, type, field, attr) \ ARB_GENERATE_NEXT(name, type, field, attr) \ ARB_GENERATE_CPREV(name, type, field, attr) \ ARB_GENERATE_PREV(name, type, field, attr) \ ARB_GENERATE_CMINMAX(name, type, field, attr) \ ARB_GENERATE_MINMAX(name, type, field, attr) \ ARB_GENERATE_REINSERT(name, type, field, cmp, attr) #define ARB_GENERATE_INSERT_COLOR(name, type, field, attr) \ attr void \ name##_ARB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ struct type *parent, *gparent, *tmp; \ while ((parent = ARB_PARENT(head, elm, field)) != NULL && \ ARB_COLOR(parent, field) == ARB_RED) { \ gparent = ARB_PARENT(head, parent, field); \ if (parent == ARB_LEFT(head, gparent, field)) { \ tmp = ARB_RIGHT(head, gparent, field); \ if (tmp && ARB_COLOR(tmp, field) == ARB_RED) { \ ARB_COLOR(tmp, field) = ARB_BLACK; \ ARB_SET_BLACKRED(parent, gparent, field); \ elm = gparent; \ continue; \ } \ if (ARB_RIGHT(head, parent, field) == elm) { \ ARB_ROTATE_LEFT(head, parent, tmp, field); \ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ ARB_SET_BLACKRED(parent, gparent, field); \ ARB_ROTATE_RIGHT(head, gparent, tmp, field); \ } else { \ tmp = ARB_LEFT(head, gparent, field); \ if (tmp && ARB_COLOR(tmp, field) == ARB_RED) { \ ARB_COLOR(tmp, field) = ARB_BLACK; \ ARB_SET_BLACKRED(parent, gparent, field); \ elm = gparent; \ continue; \ } \ if (ARB_LEFT(head, parent, field) == elm) { \ ARB_ROTATE_RIGHT(head, parent, tmp, field); \ tmp = parent; \ parent = elm; \ elm = tmp; \ } \ ARB_SET_BLACKRED(parent, gparent, field); \ ARB_ROTATE_LEFT(head, gparent, tmp, field); \ } \ } \ ARB_COLOR(ARB_ROOT(head), field) = ARB_BLACK; \ } #define ARB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ attr void \ name##_ARB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ { \ struct type *tmp; \ while ((elm == NULL || ARB_COLOR(elm, field) == ARB_BLACK) && \ elm != ARB_ROOT(head)) { \ if (ARB_LEFT(head, parent, field) == elm) { \ tmp = ARB_RIGHT(head, parent, field); \ if (ARB_COLOR(tmp, field) == ARB_RED) { \ ARB_SET_BLACKRED(tmp, parent, field); \ ARB_ROTATE_LEFT(head, parent, tmp, field); \ tmp = ARB_RIGHT(head, parent, field); \ } \ if ((ARB_LEFT(head, tmp, field) == NULL || \ ARB_COLOR(ARB_LEFT(head, tmp, field), field) == ARB_BLACK) && \ (ARB_RIGHT(head, tmp, field) == NULL || \ ARB_COLOR(ARB_RIGHT(head, tmp, field), field) == ARB_BLACK)) { \ ARB_COLOR(tmp, field) = ARB_RED; \ elm = parent; \ parent = ARB_PARENT(head, elm, field); \ } else { \ if (ARB_RIGHT(head, tmp, field) == NULL || \ ARB_COLOR(ARB_RIGHT(head, tmp, field), field) == ARB_BLACK) { \ struct type *oleft; \ if ((oleft = ARB_LEFT(head, tmp, field)) \ != NULL) \ ARB_COLOR(oleft, field) = ARB_BLACK; \ ARB_COLOR(tmp, field) = ARB_RED; \ ARB_ROTATE_RIGHT(head, tmp, oleft, field); \ tmp = ARB_RIGHT(head, parent, field); \ } \ ARB_COLOR(tmp, field) = ARB_COLOR(parent, field); \ ARB_COLOR(parent, field) = ARB_BLACK; \ if (ARB_RIGHT(head, tmp, field)) \ ARB_COLOR(ARB_RIGHT(head, tmp, field), field) = ARB_BLACK; \ ARB_ROTATE_LEFT(head, parent, tmp, field); \ elm = ARB_ROOT(head); \ break; \ } \ } else { \ tmp = ARB_LEFT(head, parent, field); \ if (ARB_COLOR(tmp, field) == ARB_RED) { \ ARB_SET_BLACKRED(tmp, parent, field); \ ARB_ROTATE_RIGHT(head, parent, tmp, field); \ tmp = ARB_LEFT(head, parent, field); \ } \ if ((ARB_LEFT(head, tmp, field) == NULL || \ ARB_COLOR(ARB_LEFT(head, tmp, field), field) == ARB_BLACK) && \ (ARB_RIGHT(head, tmp, field) == NULL || \ ARB_COLOR(ARB_RIGHT(head, tmp, field), field) == ARB_BLACK)) { \ ARB_COLOR(tmp, field) = ARB_RED; \ elm = parent; \ parent = ARB_PARENT(head, elm, field); \ } else { \ if (ARB_LEFT(head, tmp, field) == NULL || \ ARB_COLOR(ARB_LEFT(head, tmp, field), field) == ARB_BLACK) { \ struct type *oright; \ if ((oright = ARB_RIGHT(head, tmp, field)) \ != NULL) \ ARB_COLOR(oright, field) = ARB_BLACK; \ ARB_COLOR(tmp, field) = ARB_RED; \ ARB_ROTATE_LEFT(head, tmp, oright, field); \ tmp = ARB_LEFT(head, parent, field); \ } \ ARB_COLOR(tmp, field) = ARB_COLOR(parent, field); \ ARB_COLOR(parent, field) = ARB_BLACK; \ if (ARB_LEFT(head, tmp, field)) \ ARB_COLOR(ARB_LEFT(head, tmp, field), field) = ARB_BLACK; \ ARB_ROTATE_RIGHT(head, parent, tmp, field); \ elm = ARB_ROOT(head); \ break; \ } \ } \ } \ if (elm) \ ARB_COLOR(elm, field) = ARB_BLACK; \ } #define ARB_GENERATE_REMOVE(name, type, field, attr) \ attr struct type * \ name##_ARB_REMOVE(struct name *head, struct type *elm) \ { \ struct type *child, *parent, *old = elm; \ int color; \ if (ARB_LEFT(head, elm, field) == NULL) \ child = ARB_RIGHT(head, elm, field); \ else if (ARB_RIGHT(head, elm, field) == NULL) \ child = ARB_LEFT(head, elm, field); \ else { \ struct type *left; \ elm = ARB_RIGHT(head, elm, field); \ while ((left = ARB_LEFT(head, elm, field)) != NULL) \ elm = left; \ child = ARB_RIGHT(head, elm, field); \ parent = ARB_PARENT(head, elm, field); \ color = ARB_COLOR(elm, field); \ if (child) \ ARB_PARENTIDX(child, field) = \ ARB_SELFIDX(head, parent); \ if (parent) { \ if (ARB_LEFT(head, parent, field) == elm) \ ARB_LEFTIDX(parent, field) = \ ARB_SELFIDX(head, child); \ else \ ARB_RIGHTIDX(parent, field) = \ ARB_SELFIDX(head, child); \ ARB_AUGMENT(parent); \ } else \ ARB_ROOTIDX(head) = ARB_SELFIDX(head, child); \ if (ARB_PARENT(head, elm, field) == old) \ parent = elm; \ (elm)->field = (old)->field; \ if (ARB_PARENT(head, old, field)) { \ if (ARB_LEFT(head, ARB_PARENT(head, old, field), \ field) == old) \ ARB_LEFTIDX(ARB_PARENT(head, old, field), \ field) = ARB_SELFIDX(head, elm); \ else \ ARB_RIGHTIDX(ARB_PARENT(head, old, field),\ field) = ARB_SELFIDX(head, elm); \ ARB_AUGMENT(ARB_PARENT(head, old, field)); \ } else \ ARB_ROOTIDX(head) = ARB_SELFIDX(head, elm); \ ARB_PARENTIDX(ARB_LEFT(head, old, field), field) = \ ARB_SELFIDX(head, elm); \ if (ARB_RIGHT(head, old, field)) \ ARB_PARENTIDX(ARB_RIGHT(head, old, field), \ field) = ARB_SELFIDX(head, elm); \ if (parent) { \ left = parent; \ do { \ ARB_AUGMENT(left); \ } while ((left = ARB_PARENT(head, left, field)) \ != NULL); \ } \ goto color; \ } \ parent = ARB_PARENT(head, elm, field); \ color = ARB_COLOR(elm, field); \ if (child) \ ARB_PARENTIDX(child, field) = ARB_SELFIDX(head, parent);\ if (parent) { \ if (ARB_LEFT(head, parent, field) == elm) \ ARB_LEFTIDX(parent, field) = \ ARB_SELFIDX(head, child); \ else \ ARB_RIGHTIDX(parent, field) = \ ARB_SELFIDX(head, child); \ ARB_AUGMENT(parent); \ } else \ ARB_ROOTIDX(head) = ARB_SELFIDX(head, child); \ color: \ if (color == ARB_BLACK) \ name##_ARB_REMOVE_COLOR(head, parent, child); \ ARB_CURNODES(head) -= 1; \ if (ARB_MINIDX(head) == ARB_SELFIDX(head, old)) \ ARB_MINIDX(head) = ARB_PARENTIDX(old, field); \ if (ARB_MAXIDX(head) == ARB_SELFIDX(head, old)) \ ARB_MAXIDX(head) = ARB_PARENTIDX(old, field); \ ARB_RETURNFREE(head, old, field); \ return (old); \ } \ #define ARB_GENERATE_INSERT(name, type, field, cmp, attr) \ /* Inserts a node into the RB tree */ \ attr struct type * \ name##_ARB_INSERT(struct name *head, struct type *elm) \ { \ struct type *tmp; \ struct type *parent = NULL; \ int comp = 0; \ tmp = ARB_ROOT(head); \ while (tmp) { \ parent = tmp; \ comp = (cmp)(elm, parent); \ if (comp < 0) \ tmp = ARB_LEFT(head, tmp, field); \ else if (comp > 0) \ tmp = ARB_RIGHT(head, tmp, field); \ else \ return (tmp); \ } \ ARB_SET(head, elm, parent, field); \ if (parent != NULL) { \ if (comp < 0) \ ARB_LEFTIDX(parent, field) = \ ARB_SELFIDX(head, elm); \ else \ ARB_RIGHTIDX(parent, field) = \ ARB_SELFIDX(head, elm); \ ARB_AUGMENT(parent); \ } else \ ARB_ROOTIDX(head) = ARB_SELFIDX(head, elm); \ name##_ARB_INSERT_COLOR(head, elm); \ ARB_CURNODES(head) += 1; \ if (ARB_MINIDX(head) == ARB_NULLIDX || \ (ARB_PARENTIDX(elm, field) == ARB_MINIDX(head) && \ ARB_LEFTIDX(parent, field) == ARB_SELFIDX(head, elm))) \ ARB_MINIDX(head) = ARB_SELFIDX(head, elm); \ if (ARB_MAXIDX(head) == ARB_NULLIDX || \ (ARB_PARENTIDX(elm, field) == ARB_MAXIDX(head) && \ ARB_RIGHTIDX(parent, field) == ARB_SELFIDX(head, elm))) \ ARB_MAXIDX(head) = ARB_SELFIDX(head, elm); \ return (NULL); \ } #define ARB_GENERATE_CFIND(name, type, field, cmp, attr) \ /* Finds the node with the same key as elm */ \ attr const struct type * \ name##_ARB_CFIND(const struct name *head, const struct type *elm) \ { \ const struct type *tmp = ARB_ROOT(head); \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) \ tmp = ARB_LEFT(head, tmp, field); \ else if (comp > 0) \ tmp = ARB_RIGHT(head, tmp, field); \ else \ return (tmp); \ } \ return (NULL); \ } #define ARB_GENERATE_FIND(name, type, field, cmp, attr) \ attr struct type * \ name##_ARB_FIND(const struct name *head, const struct type *elm) \ { return (__DECONST(struct type *, name##_ARB_CFIND(head, elm))); } #define ARB_GENERATE_CNFIND(name, type, field, cmp, attr) \ /* Finds the first node greater than or equal to the search key */ \ attr const struct type * \ name##_ARB_CNFIND(const struct name *head, const struct type *elm) \ { \ const struct type *tmp = ARB_ROOT(head); \ const struct type *res = NULL; \ int comp; \ while (tmp) { \ comp = cmp(elm, tmp); \ if (comp < 0) { \ res = tmp; \ tmp = ARB_LEFT(head, tmp, field); \ } \ else if (comp > 0) \ tmp = ARB_RIGHT(head, tmp, field); \ else \ return (tmp); \ } \ return (res); \ } #define ARB_GENERATE_NFIND(name, type, field, cmp, attr) \ attr struct type * \ name##_ARB_NFIND(const struct name *head, const struct type *elm) \ { return (__DECONST(struct type *, name##_ARB_CNFIND(head, elm))); } #define ARB_GENERATE_CNEXT(name, type, field, attr) \ /* ARGSUSED */ \ attr const struct type * \ name##_ARB_CNEXT(const struct name *head, const struct type *elm) \ { \ if (ARB_RIGHT(head, elm, field)) { \ elm = ARB_RIGHT(head, elm, field); \ while (ARB_LEFT(head, elm, field)) \ elm = ARB_LEFT(head, elm, field); \ } else { \ if (ARB_PARENT(head, elm, field) && \ (elm == ARB_LEFT(head, ARB_PARENT(head, elm, field),\ field))) \ elm = ARB_PARENT(head, elm, field); \ else { \ while (ARB_PARENT(head, elm, field) && \ (elm == ARB_RIGHT(head, ARB_PARENT(head, \ elm, field), field))) \ elm = ARB_PARENT(head, elm, field); \ elm = ARB_PARENT(head, elm, field); \ } \ } \ return (elm); \ } #define ARB_GENERATE_NEXT(name, type, field, attr) \ attr struct type * \ name##_ARB_NEXT(const struct name *head, const struct type *elm) \ { return (__DECONST(struct type *, name##_ARB_CNEXT(head, elm))); } #define ARB_GENERATE_CPREV(name, type, field, attr) \ /* ARGSUSED */ \ attr const struct type * \ name##_ARB_CPREV(const struct name *head, const struct type *elm) \ { \ if (ARB_LEFT(head, elm, field)) { \ elm = ARB_LEFT(head, elm, field); \ while (ARB_RIGHT(head, elm, field)) \ elm = ARB_RIGHT(head, elm, field); \ } else { \ if (ARB_PARENT(head, elm, field) && \ (elm == ARB_RIGHT(head, ARB_PARENT(head, elm, \ field), field))) \ elm = ARB_PARENT(head, elm, field); \ else { \ while (ARB_PARENT(head, elm, field) && \ (elm == ARB_LEFT(head, ARB_PARENT(head, elm,\ field), field))) \ elm = ARB_PARENT(head, elm, field); \ elm = ARB_PARENT(head, elm, field); \ } \ } \ return (elm); \ } #define ARB_GENERATE_PREV(name, type, field, attr) \ attr struct type * \ name##_ARB_PREV(const struct name *head, const struct type *elm) \ { return (__DECONST(struct type *, name##_ARB_CPREV(head, elm))); } #define ARB_GENERATE_CMINMAX(name, type, field, attr) \ attr const struct type * \ name##_ARB_CMINMAX(const struct name *head, int val) \ { \ const struct type *tmp = ARB_EMPTY(head) ? NULL : ARB_ROOT(head);\ const struct type *parent = NULL; \ while (tmp) { \ parent = tmp; \ if (val < 0) \ tmp = ARB_LEFT(head, tmp, field); \ else \ tmp = ARB_RIGHT(head, tmp, field); \ } \ return (__DECONST(struct type *, parent)); \ } #define ARB_GENERATE_MINMAX(name, type, field, attr) \ attr struct type * \ name##_ARB_MINMAX(const struct name *head, int val) \ { return (__DECONST(struct type *, name##_ARB_CMINMAX(head, val))); } #define ARB_GENERATE_REINSERT(name, type, field, cmp, attr) \ attr struct type * \ name##_ARB_REINSERT(struct name *head, struct type *elm) \ { \ struct type *cmpelm; \ if (((cmpelm = ARB_PREV(name, head, elm)) != NULL && \ (cmp)(cmpelm, elm) >= 0) || \ ((cmpelm = ARB_NEXT(name, head, elm)) != NULL && \ (cmp)(elm, cmpelm) >= 0)) { \ /* XXXLAS: Remove/insert is heavy handed. */ \ ARB_REMOVE(name, head, elm); \ /* Remove puts elm on the free list. */ \ elm = ARB_GETFREE(head, field); \ return (ARB_INSERT(name, head, elm)); \ } \ return (NULL); \ } \ #define ARB_INSERT(name, x, y) name##_ARB_INSERT(x, y) #define ARB_REMOVE(name, x, y) name##_ARB_REMOVE(x, y) #define ARB_CFIND(name, x, y) name##_ARB_CFIND(x, y) #define ARB_FIND(name, x, y) name##_ARB_FIND(x, y) #define ARB_CNFIND(name, x, y) name##_ARB_CNFIND(x, y) #define ARB_NFIND(name, x, y) name##_ARB_NFIND(x, y) #define ARB_CNEXT(name, x, y) name##_ARB_CNEXT(x, y) #define ARB_NEXT(name, x, y) name##_ARB_NEXT(x, y) #define ARB_CPREV(name, x, y) name##_ARB_CPREV(x, y) #define ARB_PREV(name, x, y) name##_ARB_PREV(x, y) #define ARB_CMIN(name, x) (ARB_MINIDX(x) == ARB_NULLIDX ? \ name##_ARB_CMINMAX(x, ARB_NEGINF) : ARB_CNODE(x, ARB_MINIDX(x))) #define ARB_MIN(name, x) (ARB_MINIDX(x) == ARB_NULLIDX ? \ name##_ARB_MINMAX(x, ARB_NEGINF) : ARB_NODE(x, ARB_MINIDX(x))) #define ARB_CMAX(name, x) (ARB_MAXIDX(x) == ARB_NULLIDX ? \ name##_ARB_CMINMAX(x, ARB_INF) : ARB_CNODE(x, ARB_MAXIDX(x))) #define ARB_MAX(name, x) (ARB_MAXIDX(x) == ARB_NULLIDX ? \ name##_ARB_MINMAX(x, ARB_INF) : ARB_NODE(x, ARB_MAXIDX(x))) #define ARB_REINSERT(name, x, y) name##_ARB_REINSERT(x, y) #define ARB_FOREACH(x, name, head) \ for ((x) = ARB_MIN(name, head); \ (x) != NULL; \ (x) = name##_ARB_NEXT(head, x)) #define ARB_FOREACH_FROM(x, name, y) \ for ((x) = (y); \ ((x) != NULL) && ((y) = name##_ARB_NEXT(x), (x) != NULL); \ (x) = (y)) #define ARB_FOREACH_SAFE(x, name, head, y) \ for ((x) = ARB_MIN(name, head); \ ((x) != NULL) && ((y) = name##_ARB_NEXT(x), (x) != NULL); \ (x) = (y)) #define ARB_FOREACH_REVERSE(x, name, head) \ for ((x) = ARB_MAX(name, head); \ (x) != NULL; \ (x) = name##_ARB_PREV(x)) #define ARB_FOREACH_REVERSE_FROM(x, name, y) \ for ((x) = (y); \ ((x) != NULL) && ((y) = name##_ARB_PREV(x), (x) != NULL); \ (x) = (y)) #define ARB_FOREACH_REVERSE_SAFE(x, name, head, y) \ for ((x) = ARB_MAX(name, head); \ ((x) != NULL) && ((y) = name##_ARB_PREV(x), (x) != NULL); \ (x) = (y)) #define ARB_ARRFOREACH(x, field, head) \ for ((x) = ARB_NODES(head); \ ARB_SELFIDX(head, x) < ARB_MAXNODES(head); \ (x)++) #define ARB_ARRFOREACH_REVWCOND(x, field, head, extracond) \ for ((x) = ARB_NODES(head) + (ARB_MAXNODES(head) - 1); \ (x) >= ARB_NODES(head) && (extracond); \ (x)--) #define ARB_ARRFOREACH_REVERSE(x, field, head) \ ARB_ARRFOREACH_REVWCOND(x, field, head, 1) +#define ARB_RESET_TREE(head, name, maxn) \ + *(head) = ARB_INITIALIZER(name, maxn) + #endif /* _SYS_ARB_H_ */ Index: head/sys/sys/stats.h =================================================================== --- head/sys/sys/stats.h (nonexistent) +++ head/sys/sys/stats.h (revision 353283) @@ -0,0 +1,1252 @@ +/*- + * Copyright (c) 2014-2018 Netflix, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * A kernel and user space statistics gathering API + infrastructure. + * + * Author: Lawrence Stewart + * + * Things to ponder: + * - Register callbacks for events e.g. counter stat passing a threshold + * + * - How could this become SIFTRv2? Perhaps publishing records to a ring + * mapped between userspace and kernel? + * + * - Potential stat types: + * RATE: events per unit time + * TIMESERIES: timestamped records. Stored in voistate? + * EWMA: Exponential weighted moving average. + * + * - How should second order stats work e.g. stat "A" depends on "B" + * + * - How do variable time windows work e.g. give me per-RTT stats + * + * - Should the API always require the caller to manage locking? Or should the + * API provide optional functionality to lock a blob during operations. + * + * - Should we continue to store unpacked naturally aligned structs in the + * blob or move to packed structs? Relates to inter-host + * serialisation/endian issues. + */ + +#ifndef _SYS_STATS_H_ +#define _SYS_STATS_H_ + +#include + +#ifndef _KERNEL +/* + * XXXLAS: Hacks to enable sharing template creation code between kernel and + * userland e.g. tcp_stats.c + */ +#define VNET(n) n +#define VNET_DEFINE(t, n) static t n __unused +#endif /* ! _KERNEL */ + +#define TPL_MAX_NAME_LEN 64 + +/* + * The longest template string spec format i.e. the normative spec format, is: + * + * "": + * + * Therefore, the max string length of a template string spec is: + * + * - TPL_MAX_NAME_LEN + * - 2 chars for "" + * - 1 char for : separating name and hash + * - 10 chars for 32bit hash + */ +#define STATS_TPL_MAX_STR_SPEC_LEN (TPL_MAX_NAME_LEN + 13) + +struct sbuf; +struct sysctl_oid; +struct sysctl_req; + +enum sb_str_fmt { + SB_STRFMT_FREEFORM = 0, + SB_STRFMT_JSON, + SB_STRFMT_NUM_FMTS /* +1 to highest numbered format type. */ +}; + +/* VOI stat types. */ +enum voi_stype { + VS_STYPE_VOISTATE = 0, /* Reserved for internal API use. */ + VS_STYPE_SUM, + VS_STYPE_MAX, + VS_STYPE_MIN, + VS_STYPE_HIST, + VS_STYPE_TDGST, + VS_NUM_STYPES /* +1 to highest numbered stat type. */ +}; + +/* + * VOI stat data types used as storage for certain stat types and to marshall + * data through various API calls. + */ +enum vsd_dtype { + VSD_DTYPE_VOISTATE = 0, /* Reserved for internal API use. */ + VSD_DTYPE_INT_S32, /* int32_t */ + VSD_DTYPE_INT_U32, /* uint32_t */ + VSD_DTYPE_INT_S64, /* int64_t */ + VSD_DTYPE_INT_U64, /* uint64_t */ + VSD_DTYPE_INT_SLONG, /* long */ + VSD_DTYPE_INT_ULONG, /* unsigned long */ + VSD_DTYPE_Q_S32, /* s32q_t */ + VSD_DTYPE_Q_U32, /* u32q_t */ + VSD_DTYPE_Q_S64, /* s64q_t */ + VSD_DTYPE_Q_U64, /* u64q_t */ + VSD_DTYPE_CRHIST32, /* continuous range histogram, 32bit buckets */ + VSD_DTYPE_DRHIST32, /* discrete range histogram, 32bit buckets */ + VSD_DTYPE_DVHIST32, /* discrete value histogram, 32bit buckets */ + VSD_DTYPE_CRHIST64, /* continuous range histogram, 64bit buckets */ + VSD_DTYPE_DRHIST64, /* discrete range histogram, 64bit buckets */ + VSD_DTYPE_DVHIST64, /* discrete value histogram, 64bit buckets */ + VSD_DTYPE_TDGSTCLUST32, /* clustering variant t-digest, 32bit buckets */ + VSD_DTYPE_TDGSTCLUST64, /* clustering variant t-digest, 64bit buckets */ + VSD_NUM_DTYPES /* +1 to highest numbered data type. */ +}; + +struct voistatdata_int32 { + union { + int32_t s32; + uint32_t u32; + }; +}; + +struct voistatdata_int64 { + union { + int64_t s64; + uint64_t u64; + //counter_u64_t u64pcpu; + }; +}; + +struct voistatdata_intlong { + union { + long slong; + unsigned long ulong; + }; +}; + +struct voistatdata_q32 { + union { + s32q_t sq32; + u32q_t uq32; + }; +}; + +struct voistatdata_q64 { + union { + s64q_t sq64; + u64q_t uq64; + }; +}; + +struct voistatdata_numeric { + union { + struct { +#if BYTE_ORDER == BIG_ENDIAN + uint32_t pad; +#endif + union { + int32_t s32; + uint32_t u32; + }; +#if BYTE_ORDER == LITTLE_ENDIAN + uint32_t pad; +#endif + } int32; + + struct { +#if BYTE_ORDER == BIG_ENDIAN + uint32_t pad; +#endif + union { + s32q_t sq32; + u32q_t uq32; + }; +#if BYTE_ORDER == LITTLE_ENDIAN + uint32_t pad; +#endif + } q32; + + struct { +#if BYTE_ORDER == BIG_ENDIAN && LONG_BIT == 32 + uint32_t pad; +#endif + union { + long slong; + unsigned long ulong; + }; +#if BYTE_ORDER == LITTLE_ENDIAN && LONG_BIT == 32 + uint32_t pad; +#endif + } intlong; + + struct voistatdata_int64 int64; + struct voistatdata_q64 q64; + }; +}; + +/* Continuous range histogram with 32bit buckets. */ +struct voistatdata_crhist32 { + uint32_t oob; + struct { + struct voistatdata_numeric lb; + uint32_t cnt; + } bkts[]; +}; + +/* Continuous range histogram with 64bit buckets. */ +struct voistatdata_crhist64 { + uint64_t oob; + struct { + struct voistatdata_numeric lb; + uint64_t cnt; + } bkts[]; +}; + +/* Discrete range histogram with 32bit buckets. */ +struct voistatdata_drhist32 { + uint32_t oob; + struct { + struct voistatdata_numeric lb, ub; + uint32_t cnt; + } bkts[]; +}; + +/* Discrete range histogram with 64bit buckets. */ +struct voistatdata_drhist64 { + uint64_t oob; + struct { + struct voistatdata_numeric lb, ub; + uint64_t cnt; + } bkts[]; +}; + +/* Discrete value histogram with 32bit buckets. */ +struct voistatdata_dvhist32 { + uint32_t oob; + struct { + struct voistatdata_numeric val; + uint32_t cnt; + } bkts[]; +}; + +/* Discrete value histogram with 64bit buckets. */ +struct voistatdata_dvhist64 { + uint64_t oob; + struct { + struct voistatdata_numeric val; + uint64_t cnt; + } bkts[]; +}; + +struct voistatdata_hist { + union { + struct voistatdata_crhist32 crhist32; + struct voistatdata_crhist64 crhist64; + struct voistatdata_dvhist32 dvhist32; + struct voistatdata_dvhist64 dvhist64; + struct voistatdata_drhist32 drhist32; + struct voistatdata_drhist64 drhist64; + }; +}; + +struct voistatdata_tdgstctd32 { + ARB16_ENTRY() ctdlnk; +#ifdef DIAGNOSTIC + RB_ENTRY(voistatdata_tdgstctd32) rblnk; +#endif + s32q_t mu; + int32_t cnt; +}; + +struct voistatdata_tdgstctd64 { + ARB16_ENTRY() ctdlnk; +#ifdef DIAGNOSTIC + RB_ENTRY(voistatdata_tdgstctd64) rblnk; +#endif + s64q_t mu; + int64_t cnt; +}; + +struct voistatdata_tdgstctd { + union { + struct voistatdata_tdgstctd32 tdgstctd32; + struct voistatdata_tdgstctd64 tdgstctd64; + }; +}; + +/* Clustering variant, fixed-point t-digest with 32bit mu/counts. */ +struct voistatdata_tdgstclust32 { + uint32_t smplcnt; /* Count of samples. */ + uint32_t compcnt; /* Count of digest compressions. */ +#ifdef DIAGNOSTIC + RB_HEAD(rbctdth32, voistatdata_tdgstctd32) rbctdtree; +#endif + /* Array-based red-black tree of centroids. */ + ARB16_HEAD(ctdth32, voistatdata_tdgstctd32) ctdtree; +}; + +/* Clustering variant, fixed-point t-digest with 64bit mu/counts. */ +struct voistatdata_tdgstclust64 { + uint64_t smplcnt; /* Count of samples. */ + uint32_t compcnt; /* Count of digest compressions. */ +#ifdef DIAGNOSTIC + RB_HEAD(rbctdth64, voistatdata_tdgstctd64) rbctdtree; +#endif + /* Array-based red-black tree of centroids. */ + ARB16_HEAD(ctdth64, voistatdata_tdgstctd64) ctdtree; +}; + +struct voistatdata_tdgst { + union { + struct voistatdata_tdgstclust32 tdgstclust32; + struct voistatdata_tdgstclust64 tdgstclust64; + }; +}; + +struct voistatdata { + union { + struct voistatdata_int32 int32; + struct voistatdata_int64 int64; + struct voistatdata_intlong intlong; + struct voistatdata_q32 q32; + struct voistatdata_q64 q64; + struct voistatdata_crhist32 crhist32; + struct voistatdata_crhist64 crhist64; + struct voistatdata_dvhist32 dvhist32; + struct voistatdata_dvhist64 dvhist64; + struct voistatdata_drhist32 drhist32; + struct voistatdata_drhist64 drhist64; + struct voistatdata_tdgstclust32 tdgstclust32; + struct voistatdata_tdgstclust64 tdgstclust64; + }; +}; + +#define VSD_HIST_LBOUND_INF 0x01 +#define VSD_HIST_UBOUND_INF 0x02 +struct vss_hist_hlpr_info { + enum hist_bkt_alloc { + BKT_LIN, /* Linear steps. */ + BKT_EXP, /* Exponential steps. */ + BKT_LINEXP, /* Exponential steps, linear sub-steps. */ + BKT_USR /* User specified buckets. */ + } scheme; + enum vsd_dtype voi_dtype; + enum vsd_dtype hist_dtype; + uint32_t flags; + struct voistatdata_numeric lb; + struct voistatdata_numeric ub; + union { + struct { + const uint64_t stepinc; + } lin; + struct { + const uint64_t stepbase; + const uint64_t stepexp; + } exp; + struct { + const uint64_t stepbase; + const uint64_t linstepdiv; + } linexp; + struct { + const uint16_t nbkts; + const struct { + struct voistatdata_numeric lb, ub; + } *bkts; + } usr; + }; +}; + +struct vss_tdgst_hlpr_info { + enum vsd_dtype voi_dtype; + enum vsd_dtype tdgst_dtype; + uint32_t nctds; + uint32_t prec; +} __aligned(sizeof(void *)); + +struct vss_numeric_hlpr_info { + uint32_t prec; +}; + +struct vss_hlpr_info { + union { + struct vss_tdgst_hlpr_info tdgst; + struct vss_hist_hlpr_info hist; + struct vss_numeric_hlpr_info numeric; + }; +}; + +struct voistatspec; +typedef int (*vss_hlpr_fn)(enum vsd_dtype, struct voistatspec *, + struct vss_hlpr_info *); + +struct voistatspec { + vss_hlpr_fn hlpr; /* iv helper function. */ + struct vss_hlpr_info *hlprinfo; /* Helper function context. */ + struct voistatdata *iv; /* Initialisation value. */ + size_t vsdsz; /* Size of iv. */ + uint32_t flags; /* Stat flags. */ + enum vsd_dtype vs_dtype : 8; /* Stat's dtype. */ + enum voi_stype stype : 8; /* Stat type. */ +}; + +extern const char *vs_stype2name[VS_NUM_STYPES]; +extern const char *vs_stype2desc[VS_NUM_STYPES]; +extern const char *vsd_dtype2name[VSD_NUM_DTYPES]; +extern const size_t vsd_dtype2size[VSD_NUM_DTYPES]; +#define LIM_MIN 0 +#define LIM_MAX 1 +extern const struct voistatdata_numeric numeric_limits[2][VSD_DTYPE_Q_U64 + 1]; + +#define TYPEOF_MEMBER(type, member) __typeof(((type *)0)->member) +#define TYPEOF_MEMBER_PTR(type, member) __typeof(*(((type *)0)->member)) +#define SIZEOF_MEMBER(type, member) sizeof(TYPEOF_MEMBER(type, member)) + +/* Cast a pointer to a voistatdata struct of requested type. */ +#define _VSD(cnst, type, ptr) ((cnst struct voistatdata_##type *)(ptr)) +#define VSD(type, ptr) _VSD(, type, ptr) +#define CONSTVSD(type, ptr) _VSD(const, type, ptr) + +#define NVSS(vss_slots) (sizeof((vss_slots)) / sizeof(struct voistatspec)) +#define STATS_VSS(st, vsf, dt, hlp, hlpi) \ +((struct voistatspec){ \ + .stype = (st), \ + .flags = (vsf), \ + .vs_dtype = (dt), \ + .hlpr = (hlp), \ + .hlprinfo = (hlpi), \ +}) + +#define STATS_VSS_SUM() STATS_VSS(VS_STYPE_SUM, 0, 0, \ + (vss_hlpr_fn)&stats_vss_numeric_hlpr, NULL) + +#define STATS_VSS_MAX() STATS_VSS(VS_STYPE_MAX, 0, 0, \ + (vss_hlpr_fn)&stats_vss_numeric_hlpr, NULL) + +#define STATS_VSS_MIN() STATS_VSS(VS_STYPE_MIN, 0, 0, \ + (vss_hlpr_fn)&stats_vss_numeric_hlpr, NULL) + +#define STATS_VSS_HIST(htype, hist_hlpr_info) STATS_VSS(VS_STYPE_HIST, 0, \ + htype, (vss_hlpr_fn)&stats_vss_hist_hlpr, \ + (struct vss_hlpr_info *)(hist_hlpr_info)) + +#define STATS_VSS_TDIGEST(tdtype, tdgst_hlpr_info) STATS_VSS(VS_STYPE_TDGST, \ + 0, tdtype, (vss_hlpr_fn)&stats_vss_tdgst_hlpr, \ + (struct vss_hlpr_info *)(tdgst_hlpr_info)) + +#define TDGST_NCTRS2VSDSZ(tdtype, nctds) (sizeof(struct voistatdata_##tdtype) + \ + ((nctds) * sizeof(TYPEOF_MEMBER_PTR(struct voistatdata_##tdtype, \ + ctdtree.arb_nodes)))) + +#define TDGST_HLPR_INFO(dt, nc, nf) \ +(&(struct vss_tdgst_hlpr_info){ \ + .tdgst_dtype = (dt), \ + .nctds = (nc), \ + .prec = (nf) \ +}) + +#define STATS_VSS_TDGSTCLUST32(nctds, prec) \ + STATS_VSS_TDIGEST(VSD_DTYPE_TDGSTCLUST32, \ + TDGST_HLPR_INFO(VSD_DTYPE_TDGSTCLUST32, nctds, prec)) + +#define STATS_VSS_TDGSTCLUST64(nctds, prec) \ + STATS_VSS_TDIGEST(VSD_DTYPE_TDGSTCLUST64, \ + TDGST_HLPR_INFO(VSD_DTYPE_TDGSTCLUST64, nctds, prec)) + +#define HIST_VSDSZ2NBKTS(htype, dsz) \ + ((dsz - sizeof(struct voistatdata_##htype)) / \ + sizeof(TYPEOF_MEMBER(struct voistatdata_##htype, bkts[0]))) + +#define HIST_NBKTS2VSDSZ(htype, nbkts) (sizeof(struct voistatdata_##htype) + \ + ((nbkts) * sizeof(TYPEOF_MEMBER_PTR(struct voistatdata_##htype, bkts)))) + +#define HIST_HLPR_INFO_LIN_FIELDS(si) .lin.stepinc = (si) + +#define HIST_HLPR_INFO_EXP_FIELDS(sb, se) \ + .exp.stepbase = (sb), .exp.stepexp = (se) + +#define HIST_HLPR_INFO_LINEXP_FIELDS(nss, sb) \ + .linexp.linstepdiv = (nss), .linexp.stepbase = (sb) + +#define HIST_HLPR_INFO_USR_FIELDS(bbs) \ + .usr.bkts = (TYPEOF_MEMBER(struct vss_hist_hlpr_info, usr.bkts))(bbs), \ + .usr.nbkts = (sizeof(bbs) / sizeof(struct voistatdata_numeric[2])) + +#define HIST_HLPR_INFO(dt, sch, f, lbd, ubd, bkthlpr_fields) \ +(&(struct vss_hist_hlpr_info){ \ + .scheme = (sch), \ + .hist_dtype = (dt), \ + .flags = (f), \ + .lb = stats_ctor_vsd_numeric(lbd), \ + .ub = stats_ctor_vsd_numeric(ubd), \ + bkthlpr_fields \ +}) + +#define STATS_VSS_CRHIST32_LIN(lb, ub, stepinc, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST32, HIST_HLPR_INFO(VSD_DTYPE_CRHIST32, \ + BKT_LIN, vsdflags, lb, ub, HIST_HLPR_INFO_LIN_FIELDS(stepinc))) +#define STATS_VSS_CRHIST64_LIN(lb, ub, stepinc, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST64, HIST_HLPR_INFO(VSD_DTYPE_CRHIST64, \ + BKT_LIN, vsdflags, lb, ub, HIST_HLPR_INFO_LIN_FIELDS(stepinc))) + +#define STATS_VSS_CRHIST32_EXP(lb, ub, stepbase, stepexp, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST32, HIST_HLPR_INFO(VSD_DTYPE_CRHIST32, \ + BKT_EXP, vsdflags, lb, ub, HIST_HLPR_INFO_EXP_FIELDS(stepbase, stepexp))) +#define STATS_VSS_CRHIST64_EXP(lb, ub, stepbase, stepexp, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST64, HIST_HLPR_INFO(VSD_DTYPE_CRHIST64, \ + BKT_EXP, vsdflags, lb, ub, HIST_HLPR_INFO_EXP_FIELDS(stepbase, stepexp))) + +#define STATS_VSS_CRHIST32_LINEXP(lb, ub, nlinsteps, stepbase, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST32, HIST_HLPR_INFO(VSD_DTYPE_CRHIST32, \ + BKT_LINEXP, vsdflags, lb, ub, HIST_HLPR_INFO_LINEXP_FIELDS(nlinsteps, \ + stepbase))) +#define STATS_VSS_CRHIST64_LINEXP(lb, ub, nlinsteps, stepbase, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST64, HIST_HLPR_INFO(VSD_DTYPE_CRHIST64, \ + BKT_LINEXP, vsdflags, lb, ub, HIST_HLPR_INFO_LINEXP_FIELDS(nlinsteps, \ + stepbase))) + +#define STATS_VSS_CRHIST32_USR(bkts, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST32, HIST_HLPR_INFO(VSD_DTYPE_CRHIST32, \ + BKT_USR, vsdflags, 0, 0, HIST_HLPR_INFO_USR_FIELDS(bkts))) +#define STATS_VSS_CRHIST64_USR(bkts, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_CRHIST64, HIST_HLPR_INFO(VSD_DTYPE_CRHIST64, \ + BKT_USR, vsdflags, 0, 0, HIST_HLPR_INFO_USR_FIELDS(bkts))) + +#define STATS_VSS_DRHIST32_USR(bkts, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_DRHIST32, HIST_HLPR_INFO(VSD_DTYPE_DRHIST32, \ + BKT_USR, vsdflags, 0, 0, HIST_HLPR_INFO_USR_FIELDS(bkts))) +#define STATS_VSS_DRHIST64_USR(bkts, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_DRHIST64, HIST_HLPR_INFO(VSD_DTYPE_DRHIST64, \ + BKT_USR, vsdflags, 0, 0, HIST_HLPR_INFO_USR_FIELDS(bkts))) + +#define STATS_VSS_DVHIST32_USR(vals, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_DVHIST32, HIST_HLPR_INFO(VSD_DTYPE_DVHIST32, \ + BKT_USR, vsdflags, 0, 0, HIST_HLPR_INFO_USR_FIELDS(vals))) +#define STATS_VSS_DVHIST64_USR(vals, vsdflags) \ + STATS_VSS_HIST(VSD_DTYPE_DVHIST64, HIST_HLPR_INFO(VSD_DTYPE_DVHIST64, \ + BKT_USR, vsdflags, 0, 0, HIST_HLPR_INFO_USR_FIELDS(vals))) + +#define DRBKT(lb, ub) { stats_ctor_vsd_numeric(lb), stats_ctor_vsd_numeric(ub) } +#define DVBKT(val) DRBKT(val, val) +#define CRBKT(lb) DRBKT(lb, lb) +#define HBKTS(...) ((struct voistatdata_numeric [][2]){__VA_ARGS__}) + +#define VSD_HIST_FIELD(hist, cnst, hist_dtype, op, field) \ + (VSD_DTYPE_CRHIST32 == (hist_dtype) ? \ + op(_VSD(cnst, crhist32, hist)->field) : \ + (VSD_DTYPE_DRHIST32 == (hist_dtype) ? \ + op(_VSD(cnst, drhist32, hist)->field) : \ + (VSD_DTYPE_DVHIST32 == (hist_dtype) ? \ + op(_VSD(cnst, dvhist32, hist)->field) : \ + (VSD_DTYPE_CRHIST64 == (hist_dtype) ? \ + op(_VSD(cnst, crhist64, hist)->field) : \ + (VSD_DTYPE_DRHIST64 == (hist_dtype) ? \ + op(_VSD(cnst, drhist64, hist)->field) : \ + (op(_VSD(cnst, dvhist64, hist)->field))))))) +#define VSD_HIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_HIST_FIELD(hist, , hist_dtype, ,field) +#define VSD_CONSTHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_HIST_FIELD(hist, const, hist_dtype, ,field) +#define VSD_HIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_HIST_FIELD(hist, , hist_dtype, (void *)&,field) +#define VSD_CONSTHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_HIST_FIELD(hist, const, hist_dtype, (void *)&,field) + +#define VSD_CRHIST_FIELD(hist, cnst, hist_dtype, op, field) \ + (VSD_DTYPE_CRHIST32 == (hist_dtype) ? \ + op(_VSD(cnst, crhist32, hist)->field) : \ + op(_VSD(cnst, crhist64, hist)->field)) +#define VSD_CRHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_CRHIST_FIELD(hist, , hist_dtype, , field) +#define VSD_CONSTCRHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_CRHIST_FIELD(hist, const, hist_dtype, , field) +#define VSD_CRHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_CRHIST_FIELD(hist, , hist_dtype, &, field) +#define VSD_CONSTCRHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_CRHIST_FIELD(hist, const, hist_dtype, &, field) + +#define VSD_DRHIST_FIELD(hist, cnst, hist_dtype, op, field) \ + (VSD_DTYPE_DRHIST32 == (hist_dtype) ? \ + op(_VSD(cnst, drhist32, hist)->field) : \ + op(_VSD(cnst, drhist64, hist)->field)) +#define VSD_DRHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_DRHIST_FIELD(hist, , hist_dtype, , field) +#define VSD_CONSTDRHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_DRHIST_FIELD(hist, const, hist_dtype, , field) +#define VSD_DRHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_DRHIST_FIELD(hist, , hist_dtype, &, field) +#define VSD_CONSTDRHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_DRHIST_FIELD(hist, const, hist_dtype, &, field) + +#define VSD_DVHIST_FIELD(hist, cnst, hist_dtype, op, field) \ + (VSD_DTYPE_DVHIST32 == (hist_dtype) ? \ + op(_VSD(cnst, dvhist32, hist)->field) : \ + op(_VSD(cnst, dvhist64, hist)->field)) +#define VSD_DVHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_DVHIST_FIELD(hist, , hist_dtype, , field) +#define VSD_CONSTDVHIST_FIELDVAL(hist, hist_dtype, field) \ + VSD_DVHIST_FIELD(hist, const, hist_dtype, , field) +#define VSD_DVHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_DVHIST_FIELD(hist, , hist_dtype, &, field) +#define VSD_CONSTDVHIST_FIELDPTR(hist, hist_dtype, field) \ + VSD_DVHIST_FIELD(hist, const, hist_dtype, &, field) + +#define STATS_ABI_V1 1 +struct statsblobv1; + +enum sb_endianness { + SB_UE = 0, /* Unknown endian. */ + SB_LE, /* Little endian. */ + SB_BE /* Big endian. */ +}; + +struct statsblob { + uint8_t abi; + uint8_t endian; + uint16_t flags; + uint16_t maxsz; + uint16_t cursz; + uint8_t opaque[]; +} __aligned(sizeof(void *)); + +struct metablob { + char *tplname; + uint32_t tplhash; + struct voi_meta { + char *name; + char *desc; + } *voi_meta; +}; + +struct statsblob_tpl { + struct metablob *mb; /* Template metadata */ + struct statsblob *sb; /* Template schema */ +}; + +struct stats_tpl_sample_rate { + /* XXXLAS: Storing slot_id assumes templates are never removed. */ + int32_t tpl_slot_id; + uint32_t tpl_sample_pct; +}; + +/* Template sample rates list management callback actions. */ +enum stats_tpl_sr_cb_action { + TPL_SR_UNLOCKED_GET, + TPL_SR_RLOCKED_GET, + TPL_SR_RUNLOCK, + TPL_SR_PUT +}; + +/* + * Callback function pointer passed as arg1 to stats_tpl_sample_rates(). ctx is + * a heap-allocated, zero-initialised blob of contextual memory valid during a + * single stats_tpl_sample_rates() call and sized per the value passed as arg2. + * Returns 0 on success, an errno on error. + * - When called with "action == TPL_SR_*_GET", return the subsystem's rates + * list ptr and count, locked or unlocked as requested. + * - When called with "action == TPL_SR_RUNLOCK", unlock the subsystem's rates + * list ptr and count. Pair with a prior "action == TPL_SR_RLOCKED_GET" call. + * - When called with "action == TPL_SR_PUT, update the subsystem's rates list + * ptr and count to the sysctl processed values and return the inactive list + * details in rates/nrates for garbage collection by stats_tpl_sample_rates(). + */ +typedef int (*stats_tpl_sr_cb_t)(enum stats_tpl_sr_cb_action action, + struct stats_tpl_sample_rate **rates, int *nrates, void *ctx); + +/* Flags related to iterating over a stats blob. */ +#define SB_IT_FIRST_CB 0x0001 +#define SB_IT_LAST_CB 0x0002 +#define SB_IT_FIRST_VOI 0x0004 +#define SB_IT_LAST_VOI 0x0008 +#define SB_IT_FIRST_VOISTAT 0x0010 +#define SB_IT_LAST_VOISTAT 0x0020 +#define SB_IT_NULLVOI 0x0040 +#define SB_IT_NULLVOISTAT 0x0080 + +struct sb_visit { + struct voistatdata *vs_data; + uint32_t tplhash; + uint32_t flags; + int16_t voi_id; + int16_t vs_dsz; + uint16_t vs_errs; + enum vsd_dtype voi_dtype : 8; + enum vsd_dtype vs_dtype : 8; + int8_t vs_stype; +}; + +/* Stats blob iterator callback called for each struct voi. */ +typedef int (*stats_blob_visitcb_t)(struct sb_visit *sbv, void *usrctx); + +/* ABI specific functions. */ +int stats_v1_tpl_alloc(const char *name, uint32_t flags); +int stats_v1_tpl_add_voistats(uint32_t tpl_id, int32_t voi_id, + const char *voi_name, enum vsd_dtype voi_dtype, uint32_t nvss, + struct voistatspec *vss, uint32_t flags); +int stats_v1_blob_init(struct statsblobv1 *sb, uint32_t tpl_id, uint32_t flags); +struct statsblobv1 * stats_v1_blob_alloc(uint32_t tpl_id, uint32_t flags); +int stats_v1_blob_clone(struct statsblobv1 **dst, size_t dstmaxsz, + struct statsblobv1 *src, uint32_t flags); +void stats_v1_blob_destroy(struct statsblobv1 *sb); +#define SB_CLONE_RSTSRC 0x0001 /* Reset src blob if clone successful. */ +#define SB_CLONE_ALLOCDST 0x0002 /* Allocate src->cursz memory for dst. */ +#define SB_CLONE_USRDSTNOFAULT 0x0004 /* Clone to wired userspace dst. */ +#define SB_CLONE_USRDST 0x0008 /* Clone to unwired userspace dst. */ +int stats_v1_blob_snapshot(struct statsblobv1 **dst, size_t dstmaxsz, + struct statsblobv1 *src, uint32_t flags); +#define SB_TOSTR_OBJDUMP 0x00000001 +#define SB_TOSTR_META 0x00000002 /* Lookup metablob and render metadata */ +int stats_v1_blob_tostr(struct statsblobv1 *sb, struct sbuf *buf, + enum sb_str_fmt fmt, uint32_t flags); +int stats_v1_blob_visit(struct statsblobv1 *sb, stats_blob_visitcb_t func, + void *usrctx); +/* VOI related function flags. */ +#define SB_VOI_RELUPDATE 0x00000001 /* voival is relative to previous value. */ +int stats_v1_voi_update(struct statsblobv1 *sb, int32_t voi_id, + enum vsd_dtype voi_dtype, struct voistatdata *voival, uint32_t flags); +int stats_v1_voistat_fetch_dptr(struct statsblobv1 *sb, int32_t voi_id, + enum voi_stype stype, enum vsd_dtype *retdtype, struct voistatdata **retvsd, + size_t *retvsdsz); + +/* End ABI specific functions. */ + +/* ABI agnostic functions. */ +int stats_vss_hlpr_init(enum vsd_dtype voi_dtype, uint32_t nvss, + struct voistatspec *vss); +void stats_vss_hlpr_cleanup(uint32_t nvss, struct voistatspec *vss); +int stats_vss_hist_hlpr(enum vsd_dtype voi_dtype, struct voistatspec *vss, + struct vss_hist_hlpr_info *info); +int stats_vss_numeric_hlpr(enum vsd_dtype voi_dtype, struct voistatspec *vss, + struct vss_numeric_hlpr_info *info); +int stats_vss_tdgst_hlpr(enum vsd_dtype voi_dtype, struct voistatspec *vss, + struct vss_tdgst_hlpr_info *info); +int stats_tpl_fetch(int tpl_id, struct statsblob_tpl **tpl); +int stats_tpl_fetch_allocid(const char *name, uint32_t hash); +int stats_tpl_id2name(uint32_t tpl_id, char *buf, size_t len); +int stats_tpl_sample_rates(struct sysctl_oid *oidp, void *arg1, intmax_t arg2, + struct sysctl_req *req); +int stats_tpl_sample_rollthedice(struct stats_tpl_sample_rate *rates, + int nrates, void *seed_bytes, size_t seed_len); +int stats_voistatdata_tostr(const struct voistatdata *vsd, + enum vsd_dtype voi_dtype, enum vsd_dtype vsd_dtype, size_t vsd_sz, + enum sb_str_fmt fmt, struct sbuf *buf, int objdump); + +static inline struct voistatdata_numeric +stats_ctor_vsd_numeric(uint64_t val) +{ + struct voistatdata_numeric tmp; + + tmp.int64.u64 = val; + + return (tmp); +} + +static inline int +stats_tpl_alloc(const char *name, uint32_t flags) +{ + + return (stats_v1_tpl_alloc(name, flags)); +} + +static inline int +stats_tpl_add_voistats(uint32_t tpl_id, int32_t voi_id, const char *voi_name, + enum vsd_dtype voi_dtype, uint32_t nvss, struct voistatspec *vss, + uint32_t flags) +{ + int ret; + + if ((ret = stats_vss_hlpr_init(voi_dtype, nvss, vss)) == 0) { + ret = stats_v1_tpl_add_voistats(tpl_id, voi_id, voi_name, + voi_dtype, nvss, vss, flags); + } + stats_vss_hlpr_cleanup(nvss, vss); + + return (ret); +} + +static inline int +stats_blob_init(struct statsblob *sb, uint32_t tpl_id, uint32_t flags) +{ + + return (stats_v1_blob_init((struct statsblobv1 *)sb, tpl_id, flags)); +} + +static inline struct statsblob * +stats_blob_alloc(uint32_t tpl_id, uint32_t flags) +{ + + return ((struct statsblob *)stats_v1_blob_alloc(tpl_id, flags)); +} + +static inline int +stats_blob_clone(struct statsblob **dst, size_t dstmaxsz, struct statsblob *src, + uint32_t flags) +{ + + return (stats_v1_blob_clone((struct statsblobv1 **)dst, dstmaxsz, + (struct statsblobv1 *)src, flags)); +} + +static inline void +stats_blob_destroy(struct statsblob *sb) +{ + + stats_v1_blob_destroy((struct statsblobv1 *)sb); +} + +static inline int +stats_blob_visit(struct statsblob *sb, stats_blob_visitcb_t func, void *usrctx) +{ + + return (stats_v1_blob_visit((struct statsblobv1 *)sb, func, usrctx)); +} + +static inline int +stats_blob_tostr(struct statsblob *sb, struct sbuf *buf, + enum sb_str_fmt fmt, uint32_t flags) +{ + + return (stats_v1_blob_tostr((struct statsblobv1 *)sb, buf, fmt, flags)); +} + +static inline int +stats_voistat_fetch_dptr(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, enum vsd_dtype *retdtype, struct voistatdata **retvsd, + size_t *retvsdsz) +{ + + return (stats_v1_voistat_fetch_dptr((struct statsblobv1 *)sb, + voi_id, stype, retdtype, retvsd, retvsdsz)); +} + +static inline int +stats_voistat_fetch_s64(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, int64_t *ret) +{ + struct voistatdata *vsd; + enum vsd_dtype vs_dtype; + int error; + + if ((error = stats_voistat_fetch_dptr(sb, voi_id, stype, &vs_dtype, &vsd, + NULL))) + return (error); + else if (VSD_DTYPE_INT_S64 != vs_dtype) + return (EFTYPE); + + *ret = vsd->int64.s64; + return (0); +} + +static inline int +stats_voistat_fetch_u64(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, uint64_t *ret) +{ + struct voistatdata *vsd; + enum vsd_dtype vs_dtype; + int error; + + if ((error = stats_voistat_fetch_dptr(sb, voi_id, stype, &vs_dtype, &vsd, + NULL))) + return (error); + else if (VSD_DTYPE_INT_U64 != vs_dtype) + return (EFTYPE); + + *ret = vsd->int64.u64; + return (0); +} + +static inline int +stats_voistat_fetch_s32(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, int32_t *ret) +{ + struct voistatdata *vsd; + enum vsd_dtype vs_dtype; + int error; + + if ((error = stats_voistat_fetch_dptr(sb, voi_id, stype, &vs_dtype, &vsd, + NULL))) + return (error); + else if (VSD_DTYPE_INT_S32 != vs_dtype) + return (EFTYPE); + + *ret = vsd->int32.s32; + return (0); +} + +static inline int +stats_voistat_fetch_u32(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, uint32_t *ret) +{ + struct voistatdata *vsd; + enum vsd_dtype vs_dtype; + int error; + + if ((error = stats_voistat_fetch_dptr(sb, voi_id, stype, &vs_dtype, &vsd, + NULL))) + return (error); + else if (VSD_DTYPE_INT_U32 != vs_dtype) + return (EFTYPE); + + *ret = vsd->int32.u32; + return (0); +} + +static inline int +stats_voistat_fetch_slong(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, long *ret) +{ + struct voistatdata *vsd; + enum vsd_dtype vs_dtype; + int error; + + if ((error = stats_voistat_fetch_dptr(sb, voi_id, stype, &vs_dtype, &vsd, + NULL))) + return (error); + else if (VSD_DTYPE_INT_SLONG != vs_dtype) + return (EFTYPE); + + *ret = vsd->intlong.slong; + return (0); +} + +static inline int +stats_voistat_fetch_ulong(struct statsblob *sb, int32_t voi_id, + enum voi_stype stype, unsigned long *ret) +{ + struct voistatdata *vsd; + enum vsd_dtype vs_dtype; + int error; + + if ((error = stats_voistat_fetch_dptr(sb, voi_id, stype, &vs_dtype, &vsd, + NULL))) + return (error); + else if (VSD_DTYPE_INT_ULONG != vs_dtype) + return (EFTYPE); + + *ret = vsd->intlong.ulong; + return (0); +} + +static inline int +stats_blob_snapshot(struct statsblob **dst, size_t dstmaxsz, + struct statsblob *src, uint32_t flags) +{ + + return (stats_v1_blob_snapshot((struct statsblobv1 **)dst, dstmaxsz, + (struct statsblobv1 *)src, flags)); +} + +static inline int +stats_voi_update_abs_s32(struct statsblob *sb, int32_t voi_id, int32_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int32.s32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_S32, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_s32(struct statsblob *sb, int32_t voi_id, int32_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int32.s32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_S32, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_u32(struct statsblob *sb, int32_t voi_id, uint32_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int32.u32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_U32, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_u32(struct statsblob *sb, int32_t voi_id, uint32_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int32.u32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_U32, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_s64(struct statsblob *sb, int32_t voi_id, int64_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int64.s64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_S64, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_s64(struct statsblob *sb, int32_t voi_id, int64_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int64.s64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_S64, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_u64(struct statsblob *sb, int32_t voi_id, uint64_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int64.u64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_U64, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_u64(struct statsblob *sb, int32_t voi_id, uint64_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.int64.u64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_U64, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_slong(struct statsblob *sb, int32_t voi_id, long voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.intlong.slong = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_SLONG, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_slong(struct statsblob *sb, int32_t voi_id, long voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.intlong.slong = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_SLONG, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_ulong(struct statsblob *sb, int32_t voi_id, + unsigned long voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.intlong.ulong = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_ULONG, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_ulong(struct statsblob *sb, int32_t voi_id, + unsigned long voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.intlong.ulong = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_INT_ULONG, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_sq32(struct statsblob *sb, int32_t voi_id, s32q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q32.sq32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_S32, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_sq32(struct statsblob *sb, int32_t voi_id, s32q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q32.sq32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_S32, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_uq32(struct statsblob *sb, int32_t voi_id, u32q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q32.uq32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_U32, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_uq32(struct statsblob *sb, int32_t voi_id, u32q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q32.uq32 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_U32, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_sq64(struct statsblob *sb, int32_t voi_id, s64q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q64.sq64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_S64, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_sq64(struct statsblob *sb, int32_t voi_id, s64q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q64.sq64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_S64, &tmp, SB_VOI_RELUPDATE)); +} + +static inline int +stats_voi_update_abs_uq64(struct statsblob *sb, int32_t voi_id, u64q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q64.uq64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_U64, &tmp, 0)); +} + +static inline int +stats_voi_update_rel_uq64(struct statsblob *sb, int32_t voi_id, u64q_t voival) +{ + + if (sb == NULL) + return (0); + + struct voistatdata tmp; + tmp.q64.uq64 = voival; + + return (stats_v1_voi_update((struct statsblobv1 *)sb, voi_id, + VSD_DTYPE_Q_U64, &tmp, SB_VOI_RELUPDATE)); +} + +/* End ABI agnostic functions. */ + +#endif /* _SYS_STATS_H_ */ Property changes on: head/sys/sys/stats.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/tools/build/options/WITHOUT_STATS =================================================================== --- head/tools/build/options/WITHOUT_STATS (nonexistent) +++ head/tools/build/options/WITHOUT_STATS (revision 353283) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to neither build nor install +.Lb libstats +and dependent binaries. Property changes on: head/tools/build/options/WITHOUT_STATS ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/tools/build/options/WITH_STATS =================================================================== --- head/tools/build/options/WITH_STATS (nonexistent) +++ head/tools/build/options/WITH_STATS (revision 353283) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to build and install +.Lb libstats +and dependent binaries. Property changes on: head/tools/build/options/WITH_STATS ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property