Changeset View
Changeset View
Standalone View
Standalone View
sys/net/netisr.c
Show First 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | |||||
* the complexity of enforcing ordering during policy changes. Protocols can | * the complexity of enforcing ordering during policy changes. Protocols can | ||||
* override the global policy (when they're not doing that, they select | * override the global policy (when they're not doing that, they select | ||||
* NETISR_DISPATCH_DEFAULT). | * NETISR_DISPATCH_DEFAULT). | ||||
*/ | */ | ||||
#define NETISR_DISPATCH_POLICY_DEFAULT NETISR_DISPATCH_DIRECT | #define NETISR_DISPATCH_POLICY_DEFAULT NETISR_DISPATCH_DIRECT | ||||
#define NETISR_DISPATCH_POLICY_MAXSTR 20 /* Used for temporary buffers. */ | #define NETISR_DISPATCH_POLICY_MAXSTR 20 /* Used for temporary buffers. */ | ||||
static u_int netisr_dispatch_policy = NETISR_DISPATCH_POLICY_DEFAULT; | static u_int netisr_dispatch_policy = NETISR_DISPATCH_POLICY_DEFAULT; | ||||
static int sysctl_netisr_dispatch_policy(SYSCTL_HANDLER_ARGS); | static int sysctl_netisr_dispatch_policy(SYSCTL_HANDLER_ARGS); | ||||
SYSCTL_PROC(_net_isr, OID_AUTO, dispatch, CTLTYPE_STRING | CTLFLAG_RWTUN, | SYSCTL_PROC(_net_isr, OID_AUTO, dispatch, | ||||
CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, | |||||
0, 0, sysctl_netisr_dispatch_policy, "A", | 0, 0, sysctl_netisr_dispatch_policy, "A", | ||||
"netisr dispatch policy"); | "netisr dispatch policy"); | ||||
/* | /* | ||||
* Allow the administrator to limit the number of threads (CPUs) to use for | * Allow the administrator to limit the number of threads (CPUs) to use for | ||||
* netisr. We don't check netisr_maxthreads before creating the thread for | * netisr. We don't check netisr_maxthreads before creating the thread for | ||||
* CPU 0. This must be set at boot. We will create at most one thread per CPU. | * CPU 0. This must be set at boot. We will create at most one thread per CPU. | ||||
* By default we initialize this to 1 which would assign just 1 cpu (cpu0) and | * By default we initialize this to 1 which would assign just 1 cpu (cpu0) and | ||||
▲ Show 20 Lines • Show All 1,375 Lines • Show Last 20 Lines |