Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vte/if_vte.c
Show All 12 Lines | |||||
struct vte_hw_stats *stats; | struct vte_hw_stats *stats; | ||||
int error; | int error; | ||||
stats = &sc->vte_stats; | stats = &sc->vte_stats; | ||||
ctx = device_get_sysctl_ctx(sc->vte_dev); | ctx = device_get_sysctl_ctx(sc->vte_dev); | ||||
child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->vte_dev)); | child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->vte_dev)); | ||||
SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_rx_mod", | SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_rx_mod", | ||||
CTLTYPE_INT | CTLFLAG_RW, &sc->vte_int_rx_mod, 0, | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
&sc->vte_int_rx_mod, 0, | |||||
sysctl_hw_vte_int_mod, "I", "vte RX interrupt moderation"); | sysctl_hw_vte_int_mod, "I", "vte RX interrupt moderation"); | ||||
SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_tx_mod", | SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "int_tx_mod", | ||||
CTLTYPE_INT | CTLFLAG_RW, &sc->vte_int_tx_mod, 0, | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
&sc->vte_int_tx_mod, 0, | |||||
sysctl_hw_vte_int_mod, "I", "vte TX interrupt moderation"); | sysctl_hw_vte_int_mod, "I", "vte TX interrupt moderation"); | ||||
/* Pull in device tunables. */ | /* Pull in device tunables. */ | ||||
sc->vte_int_rx_mod = VTE_IM_RX_BUNDLE_DEFAULT; | sc->vte_int_rx_mod = VTE_IM_RX_BUNDLE_DEFAULT; | ||||
error = resource_int_value(device_get_name(sc->vte_dev), | error = resource_int_value(device_get_name(sc->vte_dev), | ||||
device_get_unit(sc->vte_dev), "int_rx_mod", &sc->vte_int_rx_mod); | device_get_unit(sc->vte_dev), "int_rx_mod", &sc->vte_int_rx_mod); | ||||
if (error == 0) { | if (error == 0) { | ||||
if (sc->vte_int_rx_mod < VTE_IM_BUNDLE_MIN || | if (sc->vte_int_rx_mod < VTE_IM_BUNDLE_MIN || | ||||
sc->vte_int_rx_mod > VTE_IM_BUNDLE_MAX) { | sc->vte_int_rx_mod > VTE_IM_BUNDLE_MAX) { | ||||
Show All 12 Lines |