Cargo Features

[dependencies]
freebsd-kpi-13-1 = { version = "0.1.4", default-features = false, features = ["BUILD_CONFIG_KERNEL", "DEFAULT_KERNEL", "KERNEL", "SMP", "EARLY_AP_STARTUP", "LOCK_DEBUG", "MALLOC_DECLARE", "KLD_MODULE", "KLD_TIED", "WITNESS", "INVARIANTS", "INVARIANT_SUPPORT", "DEBUG_VFS_LOCKS", "LOCK_PROFILING", "KTR", "MAC", "RACCT", "INET", "INET6", "QUEUE_MACRO_DEBUG_TRACE", "EPOCH_TRACE", "LOCORE", "DDB", "SX_NOINLINE", "KDTRACE_HOOKS", "SFBUF_PROCESS_PAGE", "notyet", "TCPPCAP", "TCP_HHOOK", "SCTP_MAX_OVERHEAD", "NETFLIX_EXP_DETECTION", "WITH_PIPES", "QUOTA", "EXPERIMENTAL", "NAME_LOOKUPS_04", "IF_SETSIZE", "CTASSERT", "SOFTUPDATES", "DIAGNOSTIC", "SCTP_MCORE_INPUT", "BURN_BRIDGES", "SCTP_DETAILED_STR_STATS", "SCTP_ASOCLOG_OF_TSNS", "SCTP_FS_SPEC_LOG", "SCTP_USE_PERCPU_STAT", "SCTP_PACKET_LOGGING", "SCTP_TRACK_FREED_ASOCS", "SCTP_DEBUG", "SAN_RUNTIME", "KASAN", "ATOMIC_SAN_PREFIX", "WITH_MONITOR", "CONFIG_NET_NS", "ALTQ3_CLFIER_COMPAT", "BUF_TRACKING", "FULL_BUF_TRACKING", "DSCP_EF", "DOMAINSET_SETSIZE", "USE_CPU_NANOSECONDS", "SYSCTL_DECL", "HD_COLUMN_MASK", "SDT_PROVIDER_DECLARE", "COMPAT_43", "COMPAT_FREEBSD4", "COMPAT_FREEBSD5", "COMPAT_FREEBSD6", "COMPAT_FREEBSD7", "RATELIMIT", "DEVICE_POLLING", "SOCKBUF_DEBUG", "QUEUE_MACRO_DEBUG_TRASH", "ACCEPT_FILTER_MOD", "MAXMEMDOM_LESS_256", "WITHOUT_NETDUMP", "NO_SYSCTL_DESCR", "VIMAGE", "RN_DEBUG", "DEBUGNET", "MBUF_PROFILING", "SFBUF", "SFBUF_CPUSET", "SCHED_4BSD", "SCHED_STATS", "IMPL_DEBUG_MESSAGES_MACRO", "COMPAT_FREEBSD32", "USERLAND"] }
default = DEFAULT_KERNEL

The DEFAULT_KERNEL feature is set by default whenever freebsd-kpi-13-1 is added without default-features = false somewhere in the dependency tree.

BUILD_CONFIG_KERNEL

KPI_PLATFORM_CFG_PATH i.e /usr/src/sys/amd64/conf/GENERIC

DEFAULT_KERNEL default = CTASSERT, DEVICE_POLLING, INET, INET6, KDTRACE_HOOKS, KERNEL, MAC, MALLOC_DECLARE, RACCT, SDT_PROVIDER_DECLARE, SFBUF, SMP, SYSCTL_DECL, VIMAGE, _KERNEL, _RLIMIT_IDENT, _WANT_FILE, _WANT_PRISON, __CHAR_UNSIGNED__

TEST_K = ["KERNEL", "SCHED_ULE", "NUMA", "PREEMPTION", "VIMAGE", "INET", "INET6", "IPSEC_SUPPORT", "ROUTE_MPATH", "TCP_OFFLOAD", "TCP_BLACKBOX", "TCP_HHOOK", "TCP_RFC7413", "SCTP_SUPPORT", "KERN_TLS", "FFS", "SOFTUPDATES", "UFS_ACL", "UFS_DIRHASH", "UFS_GJOURNAL", "QUOTA", "MD_ROOT", "NFSCL", "NFSD", "NFSLOCKD", "NFS_ROOT", "MSDOSFS", "CD9660", "PROCFS", "PSEUDOFS", "TMPFS", "GEOM_RAID", "GEOM_LABEL", "EFIRT", "COMPAT_FREEBSD32", "COMPAT_FREEBSD4", "COMPAT_FREEBSD5", "COMPAT_FREEBSD6", "COMPAT_FREEBSD7", "COMPAT_FREEBSD9", "COMPAT_FREEBSD10", "COMPAT_FREEBSD11", "COMPAT_FREEBSD12", "KTRACE", "STACK", "SYSVSHM", "SYSVMSG", "SYSVSEM", "_KPOSIX_PRIORITY_SCHEDULING", "KBD_INSTALL_CDEV", "HWPMC_HOOKS", "AUDIT", "CAPABILITY_MODE", "CAPABILITIES", "MAC", "KDTRACE_FRAME", "KDTRACE_HOOKS", "DDB_CTF", "INCLUDE_CONFIG_FILE", "RACCT", "RACCT_DEFAULT_TO_DISABLED", "RCTL", "KDB", "KDB_TRACE", "EKCD", "GZIO", "ZSTDIO", "DEBUGNET", "NETDUMP", "NETGDB", "SMP", "EARLY_AP_STARTUP", "cpufreq", "acpi", "smbios", "IOMMU", "pci", "PCI_HP", "PCI_IOV", "COMPAT_LINUXKPI", "PPS_SYNC", "fdc", "ahci", "ata", "mvs", "siis", "ahc", "ahd", "esp", "hptiop", "isp", "mpt", "mps", "mpr", "sym", "isci", "ocs_fc", "pvscsi", "scbus", "ch", "da", "sa", "cd", "pass", "ses", "amr", "arcmsr", "ciss", "iir", "ips", "mly", "twa", "smartpqi", "tws", "aac", "aacp", "aacraid", "ida", "mfi", "mlx", "mrsas", "pmspcv", "twe", "nvme", "nvd", "vmd", "atkbdc", "atkbd", "psm", "kbdmux", "vga", "VESA", "splash", "sc", "SC_PIXEL_MODE", "vt", "vt_vga", "vt_efifb", "vt_vbefb", "agp", "cbb", "pccard", "cardbus", "uart", "ppc", "ppbus", "lpt", "ppi", "puc", "iflib", "em", "igc", "ix", "ixv", "ixl", "iavf", "ice", "vmx", "axp", "bxe", "le", "ti", "mlx5", "mlxfw", "mlx5en", "miibus", "ae", "age", "alc", "ale", "bce", "bfe", "bge", "cas", "dc", "et", "fxp", "gem", "jme", "lge", "msk", "nfe", "nge", "re", "rl", "sge", "sis", "sk", "ste", "stge", "vge", "vr", "xl", "wlan", "IEEE80211_DEBUG", "IEEE80211_SUPPORT_MESH", "wlan_wep", "wlan_ccmp", "wlan_tkip", "wlan_amrr", "an", "ath", "ath_pci", "ath_hal", "AH_AR5416_INTERRUPT_MITIGATION", "ATH_ENABLE_11N", "ath_rate_sample", "ipw", "iwi", "iwn", "malo", "mwl", "ral", "wpi", "crypto", "aesni", "loop", "padlock_rng", "rdrand_rng", "ether", "vlan", "tuntap", "md", "gif", "firmware", "xz", "bpf", "USB_DEBUG", "uhci", "ohci", "ehci", "xhci", "usb", "ukbd", "umass", "sound", "snd_cmi", "snd_csa", "snd_emu10kx", "snd_es137x", "snd_hda", "snd_ich", "snd_via8233", "mmc", "mmcsd", "sdhci", "rtsx", "virtio", "virtio_pci", "vtnet", "virtio_blk", "virtio_scsi", "virtio_balloon", "kvm_clock", "hyperv", "XENHVM", "xenpci", "netmap", "EVDEV_SUPPORT", "evdev", "uinput", "HID_DEBUG", "hid", "IICHID_SAMPLING"]

KERNEL DEFAULT_KERNEL = _KERNEL

Affects atomic::kernel, frame::kernel, pcb::kernel, condvar::kernel, extattr::kernel, filedesc::kernel

_WANT_FREEBSD_BITSET

Affects _bitset::FreeBsdBitSet

__CHAR_UNSIGNED__ DEFAULT_KERNEL

Affects limits::CHAR_MAX, limits::CHAR_MIN

_KERNEL DEFAULT_KERNEL KERNEL?

Affects cam::kernel, cam_periph::kernel, cam_queue::kernel, cam_sim::kernel, cam_xpt::kernel, sha1::kernel, radix::radix_node_head.rnh_lock, netinet::toecore, ip6_mroute::MRT6_OINIT, ip6_mroute::omrt6msg, netinet6::scope6_var, netipsec::keydb, cryptodev::CRYPTO_AES_128_NIST_GMAC, cryptodev::CRYPTO_AES_192_NIST_GMAC, cryptodev::CRYPTO_AES_256_NIST_GMAC, mac::mac_policy, mac::mac_framework, _cpuset::CPU_SETSIZE, _domainset::DOMAINSET_SETSIZE, domainset::kenrel

SMP DEFAULT_KERNEL

Is SMP or single core

Affects param::MAXCPU, param::SC_TABLESIZE, sctp_pcb::sctp_base_info.sctpstat, sctp_structs::sctp_mcore_input, sf_buf::sf_buf.cpumask

EARLY_AP_STARTUP
LOCK_DEBUG INVARIANTS? KLD_MODULE? KTR? LOCK_PROFILING? WITNESS?

todo! LOCK_DEBUG

Affects rwlock::kernel.__rw_wlock, rwlock::kernel._rw_wlock, sx::kernel.lock_debug_0

MALLOC_DECLARE DEFAULT_KERNEL
KLD_MODULE = LOCK_DEBUG

Affects conf::kernel.MAKEDEV_ETERNAL_KLD, sysent::SY_THR_STATIC_KLD

KLD_TIED

Affects module::kernel.DECLARE_MODULE

WITNESS = LOCK_DEBUG

Affects lock::kernel.witness

INVARIANTS = LOCK_DEBUG

Affects mbuf::kernel.M_ASSERTMAPPED, rwlock::kernel.rw_assert, sx::kernel.sx_assert_, vnode::kernel.cache_validate, softdep::worklist.wk_func, softdep::worklist.wk_line, mutex::MA_OWNED, mutex::MA_NOTOWNED, mutex::MA_RECURSED, mutex::MA_NOTRECURSED, rangelock::kernel._rangelock_cookie_assert, rangelock::kernel.RCA_LOCKED, rangelock::kernel.RCA_RLOCKED, rangelock::kernel.RCA_WLOCKED, rwlock::kernel.RA_LOCKED, rwlock::kernel.RA_RLOCKED, rwlock::kernel.RA_WLOCKED, rwlock::kernel.RA_UNLOCKED, rwlock::kernel.RA_RECURSED, rwlock::kernel.RA_NOTRECURSED

INVARIANT_SUPPORT

Affects in_pcb::kernel.inp_lock_assert, in_pcb::kernel.inp_unlock_assert, mutex::MA_OWNED, mutex::MA_NOTOWNED, mutex::MA_RECURSED, mutex::MA_NOTRECURSED, rangelock::kernel._rangelock_cookie_assert, rangelock::kernel.RCA_LOCKED, rangelock::kernel.RCA_RLOCKED, rangelock::kernel.RCA_WLOCKED, rwlock::kernel.RA_LOCKED, rwlock::kernel.RA_RLOCKED, rwlock::kernel.RA_WLOCKED, rwlock::kernel.RA_UNLOCKED, rwlock::kernel.RA_RECURSED, rwlock::kernel.RA_NOTRECURSED, sx::kernel._sx_assert, sx::kernel.invariants

DEBUG_VFS_LOCKS

Affects vnode::kernel.DebugVfsLocks, mac_framework::mac_vnode_assert_locked

LOCK_PROFILING = LOCK_DEBUG

Affects lock_profile::kernel.lock_profiling

KTR = LOCK_DEBUG
MAC DEFAULT_KERNEL

MAC Framework

Affects mac_framework::mac_ifnet_check_transmit_fp_flag, mac_framework::mac_vnode_assert_locked

RACCT DEFAULT_KERNEL

Affects resourcevar::uidinfo.ui_racct, resourcevar::kernel.ui_racct_foreach_callbk_f, resourcevar::kernel.ui_racct_foreach_pre_f, resourcevar::kernel.ui_racct_foreach_post_f

INET DEFAULT_KERNEL

Affects debugnet_int::debugnet_arp_gw, debugnet_int::debugnet_handle_arp, debugnet_int::debugnet_handle_ip, debugnet_int::debugnet_ip_output, sctp_pcb::sctp_epinfo.udp4_tun_socket

INET6 DEFAULT_KERNEL

Affects sctp_header::sctp_max_overhead.inet6, sctp_pcb::sctp_epinfo.udp6_tun_socket, sctp_pcb::sctp_pcb.efault_flowlabel, sctp_structs::sctp_nets.flowlabel, sctp_structs::sctp_association.default_flowlabel

QUEUE_MACRO_DEBUG_TRACE

Affects queue::qm_trace

EPOCH_TRACE

Affects epoch::epoch_tracker.et_epoch, epoch::epoch_tracker.et_tlink, epoch::epoch_tracker.et_file, epoch::epoch_tracker.et_line, epoch::kernel.epoch_trace

LOCORE
DDB

Affects cpuset::kernel.ddb_display_cpuset, sx::kernel.sx_chain

SX_NOINLINE
KDTRACE_HOOKS DEFAULT_KERNEL

Affects sdt::kernel.kdtrace_hooks

SFBUF_PROCESS_PAGE
notyet

Affects in_::IPCTL_DEFMTU, in6::IPV6CTL_DEFMTU, ip6_mroute::mif6.m6_rsvp_on, ip6_mroute::mif6.m6_rsvpd

TCPPCAP

Affects tcp_var::tcpcb.t_inpkts, tcp_var::tcpcb.t_outpkts

TCP_HHOOK

Affects tcp_var::kernel.hhook_run_tcp_est_in

VNET_DEBUG TCPTIMERS SCTP_MAX_OVERHEAD
_ACL_PRIVATE

Affects acl::acl_private

_KVM_VNODE

Affects bufobj::kernel, vnode::kernel

_WANT_INPCB

Affects in_pcb::want_inpcb

_WANT_KW_EXITCODE

Affects wait::kernel_or_kw_exit_code

_WANT_SYSVMSG_INTERNALS

Affects msg::want_sysvmsg_int_or_kern

_WANT_SYSVSEM_INTERNALS

Affects sem::want_sysvsem_int_or_kernel

_WANT_SYSVSHM_INTERNALS

Affects shm::want_sysvshm_ints_or_kernel

_WANT_TCPCB

Affects tcp_var::want_tcpcb

_RLIMIT_IDENT DEFAULT_KERNEL

Affects resource::rlimit_ident

_WANT_FILE DEFAULT_KERNEL

Affects file::kernel.want_file, mman::want_file_or_kernel, sys::ksem

_WANT_PRISON DEFAULT_KERNEL

Affects jail::kernel.want_prison

_STANDALONE

standalone

Affects sx::standalone

STATS NETFLIX_EXP_DETECTION
_WANT_FREEBSD11_STATFS

FreeBSD 11

Affects mount::kernel

_WANT_FREEBSD11_KEVENT

Affects event::kevent_freebsd11

WITH_PIPES

--

Affects netmap_kern::netmap_kring.pipe, netmap_kern::netmap_kring.pipe_tail

QUOTA

Affects softdep::freeblks.fb_quota

EXPERIMENTAL

Affects icmp6::ND_RA_FLAG_IPV6_ONLY, nd6::ND6_IFF_IPV6_ONLY, nd6::ND6_IFF_IPV6_ONLY_MANUAL, nd6::ND6_IFF_IPV6_ONLY_MASK

NAME_LOOKUPS_04

Affects icmp6::name_lookups_04

IF_SETSIZE
CTASSERT DEFAULT_KERNEL
SOFTUPDATES

Affects quota::kernel.quotaref, quota::kernel.quotarele, quota::kernel.quotaadj

DIAGNOSTIC

Affects bio::bio._bio_caller1, bio::bio._bio_caller2, bio::bio._bio_cflags, mount::kernel_u2.vfs_assert_mount_counters, mount::kernel_u2.vfs_dump_mount_counters, stats::voistatdata_tdgstctd32.rblnk, stats::voistatdata_tdgstctd64.rblnk, stats::voistatdata_tdgstclust32.rbctdtree, stats::voistatdata_tdgstclust64.rbctdtree, vm_map::vm_map.nupdates

SCTP_MCORE_INPUT

Affects sctp_structs::sctp_mcore_input

BURN_BRIDGES
SCTP_DETAILED_STR_STATS

Affects sctp_structs::sctp_stream_out.abandoned_unsent, sctp_structs::sctp_stream_out.abandoned_sent

SCTP_ASOCLOG_OF_TSNS

Affects sctp_pcb::sctp_inpcb.readlog, sctp_pcb::sctp_inpcb.readlog_index, sctp_structs::sctp_association.in_tsnlog, sctp_structs::sctp_association.out_tsnlog, sctp_structs::sctp_association.cumack_log, sctp_structs::sctp_association.cumack_logsnt, sctp_structs::sctp_association.tsn_in_at, sctp_structs::sctp_association.tsn_out_at, sctp_structs::sctp_association.tsn_in_wrapped, sctp_structs::sctp_association.tsn_out_wrapped, sctp_structs::sctp_association.cumack_log_at, sctp_structs::sctp_association.cumack_log_atsnt

SCTP_FS_SPEC_LOG

Affects sctp_structs::sctp_association.slog, sctp_structs::sctp_association.fs_index

SCTP_USE_PERCPU_STAT

Affects sctp_pcb::sctp_base_info.sctpstat

SCTP_PACKET_LOGGING

Affects sctp_pcb::sctp_base_info.packet_log_writers, sctp_pcb::sctp_base_info.packet_log_end, sctp_pcb::sctp_base_info.packet_log_buffer

SCTP_TRACK_FREED_ASOCS

Affects sctp_pcb::sctp_inpcb.sctp_asoc_free_list

SCTP_DEBUG

Affects sctp_sysctl::sctp_sysctl.sctp_debug_on

SAN_RUNTIME
KASAN

Affects asan::kasan

KCSAN ATOMIC_SAN_PREFIX
WITH_MONITOR

Affects netmap_kern::netmap_kring.monitors, netmap_kern::netmap_kring.max_monitors, netmap_kern::netmap_kring.n_monitors, netmap_kern::netmap_kring.mon_pos, netmap_kern::netmap_kring.mon_tail, netmap_kern::netmap_kring.zmon_list, netmap_kern::netmap_kring.mon_sync, netmap_kern::netmap_kring.mon_notify, netmap_kern::netmap_adapter.monitor_id, netmap_kern::netmap_zmon_list

CONFIG_NET_NS

Affects netmap_bdg::nm_bridge.ns

IPSTEALTH ALTQ3_CLFIER_COMPAT
BUF_TRACKING

Affects buf::buf.b_io_tracking, cam_ccb::ccb_scsiio.bio, bio::bio.bio_track_bp, bio::kernel.kernel_inl_0

FULL_BUF_TRACKING

Affects buf::BUF_TRACKING_SIZE, buf::buf.b_io_tracking, buf::buf.b_io_tcnt, cam_ccb::ccb_scsiio.bio, bio::bio.bio_track_bp, bio::kernel.kernel_inl_0

DSCP_EF
DOMAINSET_SETSIZE

Affects _domainset::DOMAINSET_SETSIZE

USE_CPU_NANOSECONDS
SYSCTL_DECL DEFAULT_KERNEL
HD_COLUMN_MASK
SDT_PROVIDER_DECLARE DEFAULT_KERNEL

Affects mac_internal::sdt_priver_declare

COMPAT_43

Affects signalvar::kernel.compat_43, signal::osigcontext, ipc::ipc_perm_old

COMPAT_FREEBSD4

Affects ucontext::mcontext4, ucontext::ucontext4, fcntl::kernel.FPOSIXSHM, fcntl::kernel.FCNTLFLAGS, msg::msqid_ds_old, sem::semid_ds_old, shm::shmid_ds_old, ipc::ipc_perm_old

COMPAT_FREEBSD5

Affects fcntl::kernel.FPOSIXSHM, fcntl::kernel.FCNTLFLAGS, msg::msqid_ds_old, sem::semid_ds_old, shm::shmid_ds_old, ipc::ipc_perm_old

COMPAT_FREEBSD6

Affects signalvar::osigevent, fcntl::kernel.FPOSIXSHM, fcntl::kernel.FCNTLFLAGS, msg::msqid_ds_old, sem::semid_ds_old, shm::shmid_ds_old, ipc::ipc_perm_old

COMPAT_FREEBSD7

Affects fcntl::kernel.FPOSIXSHM, fcntl::kernel.FCNTLFLAGS, msg::msqid_ds_old, sem::semid_ds_old, shm::shmid_ds_old, ipc::ipc_perm_old

RATELIMIT

Affects ktls::kernel.ktls_modify_txrtlmt

DEVICE_POLLING DEFAULT_KERNEL

Affects if_var::kernel.poll_cmd, if_var::kernel.poll_handler_t, if_var::kernel.ether_poll_register, if_var::kernel.ether_poll_deregister

SOCKBUF_DEBUG

Affects sockbuf::kernel.sblastrecordchk, sockbuf::kernel.sblastmbufchk, sockbuf::kernel.sbcheck, sockbuf::kernel.sockbuf_debug

QUEUE_MACRO_DEBUG_TRASH
ACCEPT_FILTER_MOD

Affects socketvar::kenrel.accept_filt_generic_mod_event

_WANT_ALL_LIO_OPCODES

Affects aio::want_all_lio_opcodes

_WANT_FREEBSD11_DIRENT

Affects dirent::freebsd11_dirent

_WANT_LWPINFO32

Affects signal::want_lwpinfo

_WANT_MNTOPTNAMES

Affects mount::kernel_u0

_WANT_VMMETER

Affects vmmeter::kernel_or_want_vmmeter

__GNUCLIKE_ASM

Affects atomic::NotGnuCLikeAsm

__LP64__

Affects signal::want_lwpinfo

__STAT_TIME_T_EXT

Affects stat::stat.st_atim_ext, stat::stat.st_mtim_ext, stat::stat.st_ctim_ext, stat::stat.st_btim_ext

MAXMEMDOM_LESS_256

MAXMEMDOM env var

Affects domainset::kenrel.domainid_t, domainset::kenrel.MAXMEMDOM

WITHOUT_NETDUMP
NO_SYSCTL_DESCR

Affects sysctl::kernel.__DESCR

VIMAGE DEFAULT_KERNEL

Affects ethernet::kernel.ether_reassign, vnet::kernel.vimage, in_var::kernel.in_detachhead, tcp_var::kernel.tcp_tw_destroy, tcp_var::kernel.tcp_hc_destroy, nd6::kernel.nd6_destroy, domain::kernel.vnet_domain_init, domain::kernel.vnet_domain_uninit

RN_DEBUG

Affects radix::radix_node.rn_info, radix::radix_node.rn_twin, radix::radix_node.rn_ybro

DEBUGNET

Affects debugnet::kernel.debugnet

MBUF_PROFILING

Affects mbuf::kernel.m_profile, mbuf::kernel.M_PROFILE

SFBUF DEFAULT_KERNEL

Affects sf_buf::kernel.sfbuf

SFBUF_CPUSET

Affects sf_buf::sf_buf.cpumask

EARLY_PRINTF UNR64_LOCKED SCHED_4BSD
SCHED_STATS

Affects sched::kernel.shed_stats

IMPL_DEBUG_MESSAGES_MACRO
COMPAT_FREEBSD32

Affects filio::kernel.compat_freebsd32

_WANT_SOCKET

Affects sockbuf::kernel_or_want_socket, socketvar::kenrel

_WANT_UNPCB

Affects unpcb::want_unpcb

_WANT_VNET

Affects vnet::want_vnet

USERLAND = __Userspace__

userland

Affects cam::userland, ethernet::userland, if_::IFF_RUNNING, if_::IFF_OACTIVE, if_::userland, icmp6::userland, ip6::IP6OPT_RTALERT, in6::userland, acl::userland, file::xfile, mman::MAP_ANONYMOUS

__Userspace__ USERLAND?

Affects sctp_uio::kenrl_userspace