From nobody Fri Apr 17 17:35:05 2026 X-Original-To: dev-commits-src-all@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 4fy28H0vPqz6WkG5 for ; Fri, 17 Apr 2026 17:35:11 +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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fy28H00hwz3ncX for ; Fri, 17 Apr 2026 17:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776447311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rU+Msi8Qf0PTRg1bZ4iIJ+Ms1G9Xs86YFYg1ZQxmR/Y=; b=VTk1S/TUtIdY9uq7UVQpim+it7awvb/juVtb7q9+Mvz6qGcVzFyyljXdKHIdBuao104rQB t1d6PqdDAx3Ubmica8LKJlN21qMuY+3AUX5Xy0n5/WhDN/kl4dD7Sn2EJZmLVhsgwRqLB3 kzFTYexBMt6v07lRBktlWyvxa9wpDdmS2d/xAQEJ1Da6r7EsY1yp6mxcT7LLsjoe6v6aZ6 ISYIQdfU9eSJJTugN0wBatlh+xKVsK4rv384m0eD41h5pwbxQQsgos8QK/AXMypdNCJLC6 L8Mx2BQoaCu13+3reRc9D0tFrWWcsB/OzvpdBxarhEKd5LBuaBaww4HFEfQ95Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1776447311; a=rsa-sha256; cv=none; b=Ojc5akIPuWuyplOiC7IiRDG9+Q1Mbm0YYUzdkCwaNJ4JGnhaqm2Q27BsV9WRtZ/B5Di6aJ sLQC+CJRsQEYDlhY8e2Hg+jnj58CBkLm4fXOY80Lx6ngKxVZ27+jpBAX4skOuwb0x584QO zX6YRp8bcJHYeAp3m5X8cnK+J/607lx3mrEX5oBlRyz+pmkZnjSSbXhkypzgy8SXlIOyrn yQJMIoBJMYUoCBFqSI9tOjdjseiuofnSRr3DrS3aYzRoUCvoAsaz3F/cUmaC0wjIjgRMk+ 030xWTJ/rovZXZmCF8jvzgRchUo+qVFW8bVl/dko22dNO+eX6J2xgAY+CwIt7Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1776447311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rU+Msi8Qf0PTRg1bZ4iIJ+Ms1G9Xs86YFYg1ZQxmR/Y=; b=uJ0WeKHSu7utEEJXhpNKfGVlg9lpm1ZfR7XLKy0cZVKFiGocxxsks2frdvZfvUT3z8n7yo sAwtCvHP0P0tJaxy+1uspz9Lvu8aOw5MDR8wERlRZcVuMv8W3AG48R1OuV7w7h10PRtyZ2 dyU36HXM6gwXNmhFTmJNqvA3GRJ14WszAaNebZeieai0o4nx45liBxgMLFf5ZDBSncN4En Mvuc1NRUZaCNRHaTO50ePgvlJGVZTSYBHEW9ou91f6pKFBJj8q5xZkgCqsVb0QkXpCWxf8 gOD7fin7QhH5kKY91/ybR5OddLgHLYU9kER//kvwi+uRgdE+CKT3qEdZIwSI3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fy28G6cWyz13P2 for ; Fri, 17 Apr 2026 17:35:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 329ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 17 Apr 2026 17:35:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 52e7958702be - main - iflib: ignore reclaim coalescing when low on tx descriptors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 52e7958702be469a61a5e3173c20a08fc0721b4d Auto-Submitted: auto-generated Date: Fri, 17 Apr 2026 17:35:05 +0000 Message-Id: <69e26f49.329ea.298f2de3@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=52e7958702be469a61a5e3173c20a08fc0721b4d commit 52e7958702be469a61a5e3173c20a08fc0721b4d Author: Andrew Gallatin AuthorDate: 2026-04-17 15:52:36 +0000 Commit: Andrew Gallatin CommitDate: 2026-04-17 17:34:27 +0000 iflib: ignore reclaim coalescing when low on tx descriptors If we are low on TX descriptors, bypass iflib_txq_can_reclaim() and force a reclaim. This is intended to reduce the number of output drops under heavy load when using simple transmit. Differential Revision: https://reviews.freebsd.org/D56339 Sponsored by: Netflix --- sys/net/iflib.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index b58544255efd..085b69b62553 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -703,6 +703,7 @@ static struct mbuf *iflib_fixup_rx(struct mbuf *m); #endif static __inline int iflib_completed_tx_reclaim(iflib_txq_t txq, struct mbuf **m_defer); +static __inline void iflib_completed_tx_reclaim_force(iflib_txq_t txq); static SLIST_HEAD(cpu_offset_list, cpu_offset) cpu_offsets = SLIST_HEAD_INITIALIZER(cpu_offsets); @@ -3600,7 +3601,7 @@ defrag: * cxgb */ if (__predict_false(nsegs > TXQ_AVAIL(txq))) { - (void)iflib_completed_tx_reclaim(txq, NULL); + iflib_completed_tx_reclaim_force(txq); if (__predict_false(nsegs > TXQ_AVAIL(txq))) { txq->ift_no_desc_avail++; bus_dmamap_unload(buf_tag, map); @@ -3789,6 +3790,20 @@ iflib_completed_tx_reclaim(iflib_txq_t txq, struct mbuf **m_defer) return (reclaim); } +/* + * Reclaim any transmit descriptors possible, ignoring coalescing + */ +static __inline void +iflib_completed_tx_reclaim_force(iflib_txq_t txq) +{ + int reclaim; + + iflib_tx_credits_update(txq->ift_ctx, txq); + reclaim = DESC_RECLAIMABLE(txq); + if (reclaim != 0) + _iflib_completed_tx_reclaim(txq, NULL, reclaim); +} + static struct mbuf ** _ring_peek_one(struct ifmp_ring *r, int cidx, int offset, int remaining) {