Lines Matching +full:protocol +full:- +full:id
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
4 * Copyright (c) 2007-2009 Robert N. M. Watson
5 * Copyright (c) 2010-2011 Juniper Networks, Inc.
47 * Protocol numbers, which are encoded in monitoring applications and kernel
49 * a value 0 < proto < 32; we currently further limit at compile-time to 16
50 * for array-sizing purposes.
58 #define NETISR_IP_DIRECT 9 /* direct-dispatch IPv4 */
59 #define NETISR_IPV6_DIRECT 10 /* direct-dispatch IPv6 */
62 * Protocol ordering and affinity policy constants. See the detailed
67 #define NETISR_POLICY_CPU 3 /* Protocol determines CPU placement. */
70 * Protocol dispatch policy constants; selects whether and when direct
81 * Three sysctls are defined. First, a per-protocol structure exported by
104 * Next, a structure per-workstream, with per-protocol data, exported as
110 u_int snws_wsid; /* Workstream ID. */
121 * Finally, a per-workstream-per-protocol structure, exported as
126 u_int snw_wsid; /* Workstream ID. */
127 u_int snw_proto; /* Protocol number. */
143 /*-
146 * netisr to determine which per-CPU workstream to assign mbufs to.
150 * NETISR_POLICY_SOURCE - netisr should maintain source ordering without
151 * advice from the protocol. netisr will ignore any
155 * NETISR_POLICY_FLOW - netisr should maintain flow ordering as defined by
156 * the mbuf header flow ID field. If the protocol
158 * protocol in the event that the mbuf doesn't have a
159 * flow ID, falling back on source ordering.
161 * NETISR_POLICY_CPU - netisr will delegate all work placement decisions to
162 * the protocol, querying nh_m2cpuid for each packet.
165 * calculated flow ID on the mbuf, such as one provided in hardware, the
168 * calculate a flow. Both protocol handlers may return a new mbuf pointer
172 * protocol handlers to notify them of CPU configuration changes so that they
182 #define NETISR_CPUID_NONE ((u_int)-1) /* No affinity returned. */
185 * Data structure describing a protocol handler.
188 const char *nh_name; /* Character string protocol name. */
189 netisr_handler_t *nh_handler; /* Protocol handler. */
193 u_int nh_proto; /* Integer protocol ID. */
194 u_int nh_qlimit; /* Maximum per-CPU queue depth. */
217 * Process a packet destined for a protocol, and attempt direct dispatch.
227 * Provide a default implementation of "map an ID to a CPU ID".
233 * to return a mapping from a number to a CPU ID that can be used with the