Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/re/if_re.c
Show All 12 Lines | |||||
struct sysctl_ctx_list *ctx; | struct sysctl_ctx_list *ctx; | ||||
struct sysctl_oid_list *children; | struct sysctl_oid_list *children; | ||||
int error; | int error; | ||||
ctx = device_get_sysctl_ctx(sc->rl_dev); | ctx = device_get_sysctl_ctx(sc->rl_dev); | ||||
children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->rl_dev)); | children = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->rl_dev)); | ||||
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "stats", | SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "stats", | ||||
CTLTYPE_INT | CTLFLAG_RW, sc, 0, re_sysctl_stats, "I", | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
sc, 0, re_sysctl_stats, "I", | |||||
"Statistics Information"); | "Statistics Information"); | ||||
if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) | if ((sc->rl_flags & (RL_FLAG_MSI | RL_FLAG_MSIX)) == 0) | ||||
return; | return; | ||||
SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "int_rx_mod", | SYSCTL_ADD_PROC(ctx, children, OID_AUTO, "int_rx_mod", | ||||
CTLTYPE_INT | CTLFLAG_RW, &sc->rl_int_rx_mod, 0, | CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
&sc->rl_int_rx_mod, 0, | |||||
sysctl_hw_re_int_mod, "I", "re RX interrupt moderation"); | sysctl_hw_re_int_mod, "I", "re RX interrupt moderation"); | ||||
/* Pull in device tunables. */ | /* Pull in device tunables. */ | ||||
sc->rl_int_rx_mod = RL_TIMER_DEFAULT; | sc->rl_int_rx_mod = RL_TIMER_DEFAULT; | ||||
error = resource_int_value(device_get_name(sc->rl_dev), | error = resource_int_value(device_get_name(sc->rl_dev), | ||||
device_get_unit(sc->rl_dev), "int_rx_mod", &sc->rl_int_rx_mod); | device_get_unit(sc->rl_dev), "int_rx_mod", &sc->rl_int_rx_mod); | ||||
if (error == 0) { | if (error == 0) { | ||||
if (sc->rl_int_rx_mod < RL_TIMER_MIN || | if (sc->rl_int_rx_mod < RL_TIMER_MIN || | ||||
sc->rl_int_rx_mod > RL_TIMER_MAX) { | sc->rl_int_rx_mod > RL_TIMER_MAX) { | ||||
Show All 12 Lines |