From nobody Thu Oct 29 06:03:02 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 4jFYYg0pGnz6xrbw for ; Thu, 29 Oct 2026 06:03:03 +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 4jFYYf526Hz4s06 for ; Thu, 29 Oct 2026 06:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793253782; 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=7X5gWEB2fK3BCN3m7NhgtIVbh2pDFFEyfoBRdXVNk+c=; b=ZMO8VqaCP1N0iaBGLdfE8FXDA8BUADRZ4OLBa68Wn0SANFbTBqElN4hfJD8GJT5faHfX+8 TWssctK7Z5fWYMV+osbzkH4taTJ24GhWq0SYGf/CV7xdn5JV+oFibiUFObwvgfjkzuPqCh 2wNwxZspGav1876AM7O8MGKcbQ7C2LI7xSi0cZRSRmP7l8WaJ8zyUWLsowxLuyDjCKhPyM LtqTTEOPKoNon1MKkNos7JpYYXjzWdsK9YMar182AomGZlEejHVIP42vj+ag5EB3ej93Ap Q7xX2CWn19lyvQfjFW+1otur54X3lV0xnHtXcImEgzzNur83P2fcCqImP4XwBA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793253782; b=nPJduUtPzQK6Dif9oAzKuNRF91ZDGnojowEVc7QIn0lGyfM0OOgimtbpa+cdL1POWPlLJF aUTtTFEa+lf1tZUMsRLyHwKJXP2XLUNLV7XH89va+SaXdKYprZLLHBog0vvIVrPqgwCXCi yQ50aEIPVh+vdVEZYuPO4zIuvto7gZ46dxecQpVrrtPWQWJpzwHLX3jjFO6NQannLno2vD tVFh7GhP1G9ipCe7wayHhkt3bNhWWLgkXtKCM5gOeK4lUNVrAVWGhrUlWSOoJsrXgaGvVE 0MZCyPxNPdZdgCaQM35hcIPU5REoipPkj/3lPvWUJ3ifkWZ3t2061Y3AuhpJfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793253782; 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=7X5gWEB2fK3BCN3m7NhgtIVbh2pDFFEyfoBRdXVNk+c=; b=jC4m3cw+qpbPXZehqPkgUDGoUALLIYaQ58VafPIcRHZn6BB2RlHzq+3UbCVR9eKiGzyqim zEWxIc+lvQchvif7FwCgjtw/8NvM82cMDzPFBSrrr4QdTXZ6yK//uX4PNseJPKlTUPZDb1 j9Vzqz+o9FysjRgNsW9QoHeKWl14IE+TE70RG6LdW4LZhW+QV6tTThj+hsj+JU+x+QDO9f iFMvH20XJXiHeQjEsPoNXuETeMqxd+aqP8drf4juxgvVcTW9Kmx1fK1mzXaKiA2dGq8mXj b0E8vzB+EAxmVna9N/na67A4xyz/3RA5UyONs1WN1JbrEB/uWRkGt3dKh0fb5g== 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 4jFYYf4PgGzR7m for ; Thu, 29 Oct 2026 06:03:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38cfc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 29 Oct 2026 06:03:02 +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: 1e57a31b1195 - stable/15 - iflib: ignore reclaim coalescing when low on tx descriptors 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: 1e57a31b11959ff0490027adb0fa146b6dd030d0 Auto-Submitted: auto-generated Date: Thu, 29 Oct 2026 06:03:02 +0000 Message-Id: <6ae2e196.38cfc.523d27c8@gitrepo.freebsd.org> The branch stable/15 has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=1e57a31b11959ff0490027adb0fa146b6dd030d0 commit 1e57a31b11959ff0490027adb0fa146b6dd030d0 Author: Andrew Gallatin AuthorDate: 2026-04-17 15:52:36 +0000 Commit: Kevin Bowling CommitDate: 2026-10-29 05:28:16 +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 (cherry picked from commit 52e7958702be469a61a5e3173c20a08fc0721b4d) --- 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 6be0c21edb7e..3bc762d919f0 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -769,6 +769,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); @@ -3739,7 +3740,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); @@ -3928,6 +3929,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) {