Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nfe/if_nfe.c
Show All 12 Lines | |||||
struct sysctl_oid *tree; | struct sysctl_oid *tree; | ||||
struct nfe_hw_stats *stats; | struct nfe_hw_stats *stats; | ||||
int error; | int error; | ||||
stats = &sc->nfe_stats; | stats = &sc->nfe_stats; | ||||
ctx = device_get_sysctl_ctx(sc->nfe_dev); | ctx = device_get_sysctl_ctx(sc->nfe_dev); | ||||
child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->nfe_dev)); | child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->nfe_dev)); | ||||
SYSCTL_ADD_PROC(ctx, child, | SYSCTL_ADD_PROC(ctx, child, | ||||
OID_AUTO, "process_limit", CTLTYPE_INT | CTLFLAG_RW, | OID_AUTO, "process_limit", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | |||||
&sc->nfe_process_limit, 0, sysctl_hw_nfe_proc_limit, "I", | &sc->nfe_process_limit, 0, sysctl_hw_nfe_proc_limit, "I", | ||||
"max number of Rx events to process"); | "max number of Rx events to process"); | ||||
sc->nfe_process_limit = NFE_PROC_DEFAULT; | sc->nfe_process_limit = NFE_PROC_DEFAULT; | ||||
error = resource_int_value(device_get_name(sc->nfe_dev), | error = resource_int_value(device_get_name(sc->nfe_dev), | ||||
device_get_unit(sc->nfe_dev), "process_limit", | device_get_unit(sc->nfe_dev), "process_limit", | ||||
&sc->nfe_process_limit); | &sc->nfe_process_limit); | ||||
if (error == 0) { | if (error == 0) { | ||||
Show All 12 Lines |