From nobody Thu Oct 29 06:03:24 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jFYZ51P23z6xrdK for ; Thu, 29 Oct 2026 06:03:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jFYZ45X11z4stR for ; Thu, 29 Oct 2026 06:03:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793253804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vYdiiYGAIYBoP6e2tSnzxMwuJwoOM6IjP/flUcGNYWE=; b=TUCI93opNdsoVs9tOYQaeGrwZAd0VK3niVsQG2p+64W4g889zxyLUSw5mVEIrqA1JDiFd+ so0QTUeDUWQt1s7gptcTdOaCqwbra4Wmo89KwTvAF6JZSngtnZvIi3LhVxDtMXagO8EzF3 jpFGK+YhdItcVUxDvABrsaHGSGQT3/xrX5eIw9HOus15truN0oHpbat9UUMbZIXbwlF/2x 5ji4IQlQJvGB9pmsUogTFDNo5ERVib4ZqmAHQ/2bAXAtAq1yNnw1FC6HIjMyG28QHH71b1 ZgonkYpi7V5RjKVMx147yTf8I5TEQgVQA2g248GHvg2M6Mh1WdSceMmZZEWhfw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793253804; b=WnAulDWCXYqz3Z9tpVVglBvaKduIEiY4hfjMvYuyWYBDWLKGia39afKIsYjGaX6z0/gD49 yiOLKBCtA1N9YbPMq8bZz3KfcUiaOzyVAAqL5l4ZlWh4LnoViG7MJt0BXMnQ2AUe1Xytia ubmhRFzJ8h41tfFBy5MDMz6NJTgm+5sD4/0Url8BHKPOth2g8nELP7yhDubKiQyR6fnABn byjqPxipphfbZkQF+6kX72iVNlvTrrHh9keyZALtxGztn5p7yNPs0L4SXTrCr5kWj/4PzE yBFtWyNb0Bl4SCbImnqYqFXsTN+u20qnNbd26eMnGF1dKLne3gwIirbvWYMRHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793253804; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vYdiiYGAIYBoP6e2tSnzxMwuJwoOM6IjP/flUcGNYWE=; b=r7L9zFjr00RLsvrQ84A/+AKIPVEy0rBfdPQPDww95QFYloESeLLDu6rYTCqNv90Iv4d8sH 0dx1mPYqe8TvUB3ThymkPjhARM8NgACXQLNuvt9o19FbRPJG3fSJ4ENftQU1M2HVxqR//Z HOohXizlL2LjefesA6TpPDJEgY6x8pnERrA+IUjXesmV7vk00MVzEYDBIpkCbFb3xM9868 E+OzhNkPtoIwXTxDsGyc84db2EAsyWEp+GL8P+o/5q9shh0brlrhCbTuMuw3b4XW673MJZ wqkutYUh573KQJN3iAVHVC/UkXRKOVD9h4x4T9NJhf3XnklxYjEBFD3PEPyBQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jFYZ454F1zR5t for ; Thu, 29 Oct 2026 06:03:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b400 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:03:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Andrew Gallatin From: Kevin Bowling Subject: git: 943e4fe3519b - stable/15 - iflib: add a new global tunable "prefer_mpring" List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: Commits to the stable branches of the FreeBSD src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 943e4fe3519b7ffad1fd6c8697cb609310833d81 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:03:24 +0000 Message-Id: <6ae2e1ac.3b400.50f5c9f4@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=943e4fe3519b7ffad1fd6c8697cb609310833d81 commit 943e4fe3519b7ffad1fd6c8697cb609310833d81 Author: Andrew Gallatin AuthorDate: 2026-09-16 16:08:17 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 05:41:55 +0000 iflib: add a new global tunable "prefer_mpring" net.iflib.prefer_mpring can be used to control whether or not all iflib driver instances default to mp_ring or simple_tx. This is intended to be temporary, to allow easy testing (now) of simple_tx, and to allow an easy fallback to the legacy path (later) once the default is switched to simple_tx (cherry picked from commit 29fcb8556681a8920d6b61ade35e4d1a238ea443) --- share/man/man4/iflib.4 | 17 +++++++++++++++-- sys/net/iflib.c | 5 +++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/share/man/man4/iflib.4 b/share/man/man4/iflib.4 index ca1b7918412e..2a752871d9a8 100644 --- 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 @@ resource contention is not a problem (well behaved applications on 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 @@ Some NICs allow processing completed transmit descriptors in batches. 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 one. .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 index 7cbf3216b12d..6c59d12c4fbb 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -703,6 +703,10 @@ static int iflib_simple_txbr_size = IFLIB_SIMPLE_TXBR_SIZE; 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 = true; +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, @@ -7633,6 +7637,7 @@ iflib_add_device_sysctl_pre(if_ctx_t ctx) "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");