Page MenuHomeFreeBSD

D56102.diff
No OneTemporary

D56102.diff

diff --git a/share/man/man4/rge.4 b/share/man/man4/rge.4
--- a/share/man/man4/rge.4
+++ b/share/man/man4/rge.4
@@ -152,6 +152,12 @@
The default value is 16.
Increasing this value may improve throughput on high-speed links at the
cost of increased interrupt latency.
+.It Va dev.rge.%d.int_rx_mod
+Interrupt moderation timer value.
+The default value is 0x2600.
+Setting this to 0 disables interrupt moderation, which reduces latency
+but increases CPU usage.
+Higher values reduce interrupt rate at the cost of increased latency.
.El
.Sh DIAGNOSTICS
.Bl -diag
diff --git a/sys/dev/rge/if_rge_hw.c b/sys/dev/rge/if_rge_hw.c
--- a/sys/dev/rge/if_rge_hw.c
+++ b/sys/dev/rge/if_rge_hw.c
@@ -1924,7 +1924,7 @@
static void
rge_setup_sim_im(struct rge_softc *sc)
{
- RGE_WRITE_4(sc, RGE_TIMERINT0, 0x2600);
+ RGE_WRITE_4(sc, RGE_TIMERINT0, sc->sc_int_rx_mod);
RGE_WRITE_4(sc, RGE_TIMERCNT, 1);
sc->rge_timerintr = 1;
}
diff --git a/sys/dev/rge/if_rge_sysctl.c b/sys/dev/rge/if_rge_sysctl.c
--- a/sys/dev/rge/if_rge_sysctl.c
+++ b/sys/dev/rge/if_rge_sysctl.c
@@ -237,6 +237,11 @@
"rx_process_limit", CTLFLAG_RW, &sc->sc_rx_process_limit, 0,
"max number of RX packets to process per interrupt");
+ sc->sc_int_rx_mod = 0x2600;
+ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+ "int_rx_mod", CTLFLAG_RW, &sc->sc_int_rx_mod, 0,
+ "interrupt moderation timer value (0 to disable)");
+
/* Stats */
rge_sysctl_drv_stats_attach(sc);
rge_sysctl_mac_stats_attach(sc);
diff --git a/sys/dev/rge/if_rgevar.h b/sys/dev/rge/if_rgevar.h
--- a/sys/dev/rge/if_rgevar.h
+++ b/sys/dev/rge/if_rgevar.h
@@ -205,6 +205,7 @@
uint32_t sc_debug;
int sc_rx_process_limit;
+ int sc_int_rx_mod;
struct rge_drv_stats sc_drv_stats;

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 19, 2:59 PM (1 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31778668
Default Alt Text
D56102.diff (1 KB)

Event Timeline