Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F173803935
D59729.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D59729.diff
View Options
diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4
--- a/share/man/man4/iflib.4
+++ b/share/man/man4/iflib.4
@@ -1,4 +1,4 @@
-.Dd September 14, 2026
+.Dd September 16, 2026
.Dt IFLIB 4
.Os
.Sh NAME
@@ -79,7 +79,9 @@
systems where there are as many NIC queues as CPU cores).
Note that when this is enabled, the tx_abdicate sysctl is no longer
applicable and is ignored.
-Defaults to zero.
+By default, this is the inverse of
+.Va net.iflib.prefer_mpring .
+An explicitly configured value takes precedence over that global default.
.El
.Pp
These
@@ -144,6 +146,17 @@
Doing so usually increases the transmit throughput by reducing the number of
transmit interrupts.
Setting this to a non-zero value will disable the use of this feature.
+.It Va net.iflib.prefer_mpring
+When set, use the
+.Va mp_ring
+transmit path by default instead of the simple transmit path.
+This is a read-only tunable that must be set before
+.Nm
+is loaded.
+An explicitly configured per-device
+.Va simple_tx
+value takes precedence.
+The default is zero.
.It Va net.iflib.simple_drain_quota
Sets the maximum number of packets that the transmit task may remove from a
simple transmit deferral ring in one drain operation.
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -704,6 +704,10 @@
SYSCTL_INT(_net_iflib, OID_AUTO, simple_txbr_size, CTLFLAG_RDTUN,
&iflib_simple_txbr_size, 0,
"number of entries in the simple tx deferral ring");
+static bool iflib_prefer_mpring;
+SYSCTL_BOOL(_net_iflib, OID_AUTO, prefer_mpring, CTLFLAG_RDTUN,
+ &iflib_prefer_mpring, 0,
+ "prefer the mp_ring transmit path by default");
static u_int iflib_simple_drain_quota = 8;
SYSCTL_UINT(_net_iflib, OID_AUTO, simple_drain_quota, CTLFLAG_RWTUN,
&iflib_simple_drain_quota, 0,
@@ -7641,6 +7645,7 @@
"tx_watchdog_events", CTLFLAG_RD, &ctx->ifc_tx_watchdog_events, 0,
"TX watchdog resets initiated by iflib");
+ ctx->ifc_sysctl_simple_tx = !iflib_prefer_mpring;
SYSCTL_ADD_BOOL(&ctx->ifc_sysctl_ctx, oid_list, OID_AUTO, "simple_tx",
CTLFLAG_RDTUN, &ctx->ifc_sysctl_simple_tx, 0,
"use simple tx ring");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 29, 1:42 PM (5 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39878536
Default Alt Text
D59729.diff (2 KB)
Attached To
Mode
D59729: iflib: add a new global tunable "prefer_mpring"
Attached
Detach File
Event Timeline
Log In to Comment