Loading...
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | /* * Copyright (c) 1999-2024 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. The rights granted to you under the License * may not be used to create, or enable the creation or redistribution of, * unlawful or unlicensed copies of an Apple operating system, or to * circumvent, violate, or enable the circumvention or violation of, any * terms of an Apple operating system software license agreement. * * Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_OSREFERENCE_LICENSE_HEADER_END@ */ /* * NOTICE: This file was modified by SPARTA, Inc. in 2005 to introduce * support for mandatory and extensible security protections. This notice * is included in support of clause 2.2 (b) of the Apple Public License, * Version 2.0. */ #ifndef DLIL_SYSCTL_H #define DLIL_SYSCTL_H /* * Sysctl settings and metrics for DLIL. */ #if BSD_KERNEL_PRIVATE #include <sys/kernel_types.h> #include <net/if.h> #include <net/dlil_var_private.h> /****************************************************************************** * Section: DLIL send and receive queues. * ******************************************************************************/ #define IF_RCVQ_MINLEN 32 #define IF_RCVQ_MAXLEN 256 extern uint32_t if_sndq_maxlen; extern uint32_t if_rcvq_maxlen; extern uint32_t if_delaybased_queue; /* enable/disable*/ extern uint32_t ifnet_start_delayed; extern uint32_t ifnet_delay_start_disabled; extern uint32_t if_rcvq_burst_limit; extern uint32_t if_rcvq_trim_pct; extern struct chain_len_stats tx_chain_len_stats; extern uint32_t tx_chain_len_count; /****************************************************************************** * Section: DLIL opportunistic rx polling. * ******************************************************************************/ /* Input poll interval definitions */ #define IF_RXPOLL_INTERVALTIME_MIN (1ULL * 1000) /* 1 us */ #define IF_RXPOLL_INTERVALTIME (1ULL * 1000 * 1000) /* 1 ms */ extern uint32_t if_rxpoll; /* enable/disable */ extern uint32_t if_rxpoll_decay; extern uint64_t if_rxpoll_mode_holdtime; extern uint64_t if_rxpoll_sample_holdtime; extern uint64_t if_rxpoll_interval_time; extern uint32_t if_rxpoll_interval_pkts; extern uint32_t if_sysctl_rxpoll_wlowat; extern uint32_t if_sysctl_rxpoll_whiwat; extern uint32_t if_rxpoll_max; #if TEST_INPUT_THREAD_TERMINATION extern uint32_t if_input_thread_termination_spin; #endif /* TEST_INPUT_THREAD_TERMINATION */ extern uint32_t cur_dlil_input_threads; /****************************************************************************** * Section: hardware-assisted checksum mechanism. * ******************************************************************************/ extern uint32_t hwcksum_tx; /* enable/disable */ extern uint32_t hwcksum_rx; /* enable/disable */ extern uint64_t hwcksum_in_invalidated; /* Inbound packets with invalid hw cksum. */ /* * Hardware-assisted checksum debugging metrics. */ #define HWCKSUM_DBG_PARTIAL_FORCED 0x1 /* Forced partial checksum. */ #define HWCKSUM_DBG_PARTIAL_RXOFF_ADJ 0x2 /* Adjust start offset. */ #define HWCKSUM_DBG_FINALIZE_FORCED 0x10 /* Forced finalize. */ #define HWCKSUM_DBG_MASK \ (HWCKSUM_DBG_PARTIAL_FORCED | HWCKSUM_DBG_PARTIAL_RXOFF_ADJ | \ HWCKSUM_DBG_FINALIZE_FORCED) extern uint32_t hwcksum_dbg; /* enable/disable */ extern uint32_t hwcksum_dbg_mode; /* HWCKSUM_DBG_ bitmask */ extern uint64_t hwcksum_dbg_partial_forced; /* Packets forced using partial cksum. */ extern uint64_t hwcksum_dbg_partial_forced_bytes; /* Bytes forced using partial cksum. */ extern uint32_t hwcksum_dbg_partial_rxoff_forced; /* Forced partial cksum rx offset. */ extern uint32_t hwcksum_dbg_partial_rxoff_adj; /* Adjusted partial cksum rx offset. */ extern uint64_t hwcksum_dbg_verified; /* Packets verified for having good cksum. */ extern uint64_t hwcksum_dbg_bad_cksum; /* Packets with bad hw cksum. */ extern uint64_t hwcksum_dbg_bad_rxoff; /* Packets with invalid rx offset. */ extern uint64_t hwcksum_dbg_adjusted; /* Packets with adjusted rx offset. */ extern uint64_t hwcksum_dbg_finalized_hdr; /* Finalized headers. */ extern uint64_t hwcksum_dbg_finalized_data; /* Finalized payloads. */ /****************************************************************************** * Section: DLIL debugging, notifications and sanity checks * ******************************************************************************/ extern uint32_t if_flowadv; /* enable/disable */ extern uint32_t threshold_notify; /* enable/disable */ extern uint32_t threshold_interval; /* in seconds */ extern struct net_api_stats net_api_stats; extern int dlil_verbose; extern uint32_t net_wake_pkt_debug; #if IFNET_INPUT_SANITY_CHK extern uint32_t dlil_input_sanity_check; #endif /* IFNET_INPUT_SANITY_CHK */ /****************************************************************************** * Section: DLIL misc * ******************************************************************************/ extern uint32_t if_max_magic_search_len; #endif /* BSD_KERNEL_PRIVATE */ #endif /* DLIL_SYSCTL_H */ |