From nobody Thu Sep 17 01:00:06 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 4hlcqc1Hl3z6sbL1 for ; Thu, 17 Sep 2026 01:00:12 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hlcqc0qnZz4XRR for ; Thu, 17 Sep 2026 01:00:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789606812; 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=AcZb0RHc/Og7yct/KFA1ogPBeVaDtn5PRwOFyokksUs=; b=vfLaPzvOyVlpmJMPgtR+oEzO0axVZbRCKFuZPH+NTzMP+Yr0ce2a7bN9KRLMMQBaiO9NwY TcEJyhDX6u2sdZwkoD98+/OjUH12BZPD94LKIWyRVTiAt4n0Fut/+h+8QWm8xnjKXnluDq QvofOsJjTdems4wVjHodBKlxdCsVHhtgxIPe/HVjsvXOOSRse9uA7n3261xce1h9xbDtpU 9B6nrKdv4S8LSpzQSULW8KIWmshdcoZ5rj22k/sTgIw5Ar8TfQuJxSJG6JO4cp5Yp8/VsG PQ8JLFjyBNB+dJaeOipZdhPaVQpFbzKkNMm4dB623PcHCtfRnfovN2bUg9UKRg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789606812; b=bsLYw4kQ+BmdbILmy8rMyu7mxun9OzC2VXFROjC5YnyWXZ/xez78ZLgM4vf/XAxInFu484 l+h07LzVdcMobRHFd8P6Pmfn/uzgngf//x0xW3GHAHRO1UaCxdS4gV5gQgYAjqRgvQbN5R TTWuy2Fa5Q3NkxGJV+glslLP6LBcQvVYUz48x8raVfKbmuECD41ObG4sbE+wF3KS+mIUhx l9/WWWWRJa5nb6zAYBdZ84hNo66b02rHOfX87NwsT/ybfNk5OCjCtPHJGgS8rkk3uSuOwM y/EJfT+7MGcHQe6FkXfXNYFFxsoruJ73bv5atJgJTnnhgES19+ojEpzrEpxVIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789606812; 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=AcZb0RHc/Og7yct/KFA1ogPBeVaDtn5PRwOFyokksUs=; b=eAy20F0a3ldkzX0eqC7y5rhjVSXbe7j6hbLnF1zXpP74EfHr8/c0XA8jMCm8ceYwSlxA6j nEJHvL8hp1+bWkn4V88/4+aJ0CbQfL3+UME5IK7e1CYCUVFA5JETtwa+kwGNeipUjSKKZo 9Azcdzwf/QQXGqdKJKhx9SC+zs64n80ZtbcisixY3rzO2Orec4YKqgSkzVm0b3Bo5srgpT Wp5X4eKKOn0d4xzfViXikp4XenGdTM+Ccn/agdNZjtMq+fkq2q3oMU3kyLYdw6dvlr0Dhh LwrxyvxbJKdR6ueqWUST56xUIy0VV5Q5pry6QDxhUs4tY/Mh6dvOQZF6Vt3qWA== 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 4hlcqb71YFz18fn for ; Thu, 17 Sep 2026 01:00:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33633 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 01:00:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 99191ce8044d - main - ice: Honor iflib transmit completion batching 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 List-Id: 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/main X-Git-Reftype: branch X-Git-Commit: 99191ce8044dd82d317ec62efea35bf5369cd592 Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 01:00:06 +0000 Message-Id: <6aab3b96.33633.73104c94@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=99191ce8044dd82d317ec62efea35bf5369cd592 commit 99191ce8044dd82d317ec62efea35bf5369cd592 Author: Kevin Bowling AuthorDate: 2026-08-18 11:04:33 +0000 Commit: Kevin Bowling CommitDate: 2026-09-17 00:58:10 +0000 ice: Honor iflib transmit completion batching ice marked every transmitted packet RS and recorded every last descriptor in its report-status queue. Hardware therefore wrote descriptor status for every packet, and the driver traversed every packet while reclaiming completed descriptors. iflib marks selected packets with IPI_TX_INTR as completion checkpoints. It forces a checkpoint as deferred work or ring pressure grows. Retain EOP on every packet, but set RS and record the descriptor only at those checkpoints. DPDK uses the same sparse-RS design and defaults tx_rs_thresh to 32. Let iflib choose the adaptive interval for FreeBSD. This reduces PCIe and memory traffic while preserving bounded descriptor reclamation. Validated on an E810-XXV in an A-B-A test with five matched four-stream, TSO-disabled transmit runs per phase. Median throughput was 9.413, 9.413, and 9.414 Gbps. Median whole-system CPU was 21.54%, 17.75%, and 21.62%, respectively. The candidate used less system CPU than both exact-baseline phases in every pair. Interrupt rate was unchanged, no transmit watchdog fired, and normal TSO traffic remained line-rate. DTrace confirmed that only iflib-selected packet-final descriptors carried RS after the change. The effect should be more profound at 200Gbps but my DUT is network limited. Reviewed by: gallatin MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D58910 --- sys/dev/ice/ice_iflib_txrx.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/sys/dev/ice/ice_iflib_txrx.c b/sys/dev/ice/ice_iflib_txrx.c index a090717e7c5e..1c89b85ef4b1 100644 --- a/sys/dev/ice/ice_iflib_txrx.c +++ b/sys/dev/ice/ice_iflib_txrx.c @@ -138,10 +138,14 @@ _ice_ift_txd_encap(struct ice_tx_queue *txq, if_pkt_info_t pi) bus_dma_segment_t *segs = pi->ipi_segs; struct ice_tx_desc *txd = NULL; int i, j, mask, pidx_last; - u32 cmd, off; + u32 cmd, off, tx_intr, txd_cmd; cmd = off = 0; i = pi->ipi_pidx; + tx_intr = pi->ipi_flags & IPI_TX_INTR; + txd_cmd = ICE_TX_DESC_CMD_EOP; + if (tx_intr) + txd_cmd |= ICE_TX_DESC_CMD_RS; /* Set up the TSO/CSUM offload */ if (pi->ipi_csum_flags & ICE_CSUM_OFFLOAD) { @@ -177,14 +181,15 @@ _ice_ift_txd_encap(struct ice_tx_queue *txq, if_pkt_info_t pi) } /* Set the last descriptor for report */ -#define ICE_TXD_CMD (ICE_TX_DESC_CMD_EOP | ICE_TX_DESC_CMD_RS) txd->cmd_type_offset_bsz |= - htole64(((u64)ICE_TXD_CMD << ICE_TXD_QW1_CMD_S)); + htole64((u64)txd_cmd << ICE_TXD_QW1_CMD_S); - /* Add to report status array */ - txq->tx_rsq[txq->tx_rs_pidx] = pidx_last; - txq->tx_rs_pidx = (txq->tx_rs_pidx+1) & mask; - MPASS(txq->tx_rs_pidx != txq->tx_rs_cidx); + /* Add to report status array if requesting descriptor writeback. */ + if (tx_intr) { + txq->tx_rsq[txq->tx_rs_pidx] = pidx_last; + txq->tx_rs_pidx = (txq->tx_rs_pidx+1) & mask; + MPASS(txq->tx_rs_pidx != txq->tx_rs_cidx); + } pi->ipi_new_pidx = i;