Page MenuHomeFreeBSD

D56014.1795403706.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D56014.1795403706.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
@@ -132,6 +132,11 @@
.Bl -tag -width "xxxxxx"
.It Va dev.rge.%d.debug
Configure runtime debug output. This is a 32 bit bitmask.
+.It Va dev.rge.%d.rx_process_limit
+Maximum number of RX packets to process per interrupt.
+The default value is 16.
+Increasing this value may improve throughput on high-speed links at the
+cost of increased interrupt latency.
.El
.Sh DIAGNOSTICS
.Bl -diag
diff --git a/sys/dev/rge/if_rge.c b/sys/dev/rge/if_rge.c
--- a/sys/dev/rge/if_rge.c
+++ b/sys/dev/rge/if_rge.c
@@ -2104,9 +2104,10 @@
uint32_t rxstat, extsts;
int i, mlen, rx = 0;
int cons, prod;
- int maxpkt = 16; /* XXX TODO: make this a tunable */
+ int maxpkt;
bool check_hwcsum;
+ maxpkt = sc->sc_rx_process_limit;
check_hwcsum = ((if_getcapenable(sc->sc_ifp) & IFCAP_RXCSUM) != 0);
RGE_ASSERT_LOCKED(sc);
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
@@ -232,6 +232,11 @@
"debug", CTLFLAG_RW, &sc->sc_debug, 0,
"control debugging printfs");
+ sc->sc_rx_process_limit = 16;
+ SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO,
+ "rx_process_limit", CTLFLAG_RW, &sc->sc_rx_process_limit, 0,
+ "max number of RX packets to process per interrupt");
+
/* 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
@@ -206,6 +206,8 @@
uint32_t sc_debug;
+ int sc_rx_process_limit;
+
struct rge_drv_stats sc_drv_stats;
struct rge_mac_stats sc_mac_stats;

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 23, 3:15 AM (7 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41921506
Default Alt Text
D56014.1795403706.diff (1 KB)

Event Timeline