From nobody Thu Sep 17 01:00:06 2026 X-Original-To: dev-commits-src-main@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 4hlcqW1TWwz6sbHr for ; Thu, 17 Sep 2026 01:00:07 +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 4hlcqW0vBnz4XQp for ; Thu, 17 Sep 2026 01:00:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789606807; 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=uzytqgsdmrLLRMoipkPWOwKuxSqq9hy9XobqC+0FZSBNdTpJ+VuZyQc4mxvQ8GrgijS6nd XAQrEHhhTvlZqd9pX0JityWxL+6tyZbludjRRdivAMdG58tjO1N2TPpUfnrW3zRBB8hlD/ Rg21iCwhi7QocMttVos/3pj9Lm3WLZKEZusZOLnH1TioblJ9RdIgvGQGJvkDE5OIkNOT5H PYyGA6QqzP/M6boN4xxzYfr2pStNgGM/AHvr4DBn1LlwYkrI3xOk7LUGhhDCdgqEhQJRdV g1kHqkfJKL4SjbEEyPNlzpxRmmLY/IzOOYA2ZW49OP7SCaiEfa6dL23oIaMb5A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789606807; b=Rs/V5MHXfOZlK8GTXYbpokoJR4N0xQBtob9Mi2UZuB8IYW2UuTy9t6vyFrv3E9AOR37RmL LVlNBZFOkMMgNZ5e0jt4J6/lwFRyXWckjH98NliSBzhUtq35k7Qn4JgePIQWuo++qbhI5z aqebtdKkuzwGcnNjy8+0CxwDvSUi47+As+kbajXAicOtQOTxHKqu3H0sPOPm1pgw0+CZhC vXCe3JMd7xhe7Luea44PRGZxkIEClpbSlLTuNQ1Y3HnUzhsH35tUpaO4ly0ldJdAo8sZTZ Pb11pPkcTfjgSUlg95N4hukQwg+Mgn6wNVz3dnpL8uTn+T8NPXEfNNEdVxOWZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789606807; 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=lZ/ymLMrfFgpXxXetDAjoayqvgzxGw06qK3vE7uSkLCyXhY1EmVkFwIsQwMwFhgJJ+SxXN +1lgyx1Mb9NbS84ttSGHNKGZk9UtDqm+syZeCBCOX21jafM5by40JC7pJAdnvRxXK9UrKS nkWkHEaxhMkY0Lt6pMfMiclm06JIk3cw1tlI+4No+med+lHogNxnQkKrSkA77ukxRjP5Ai kmXKtEQ1xT5UUKfErLPGmI7rweZNpUXFKWl3gdLK3rb0zEA72HYFUfQ1SmHALqC+TUuclY EC7/hLkJys+vwHCQ5GUknVoenjTcE9Rs9Ydma3q7vMAg/vuoxSfpvRWcCjScWQ== 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 4hlcqV743bz18fm for ; Thu, 17 Sep 2026 01:00:06 +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 the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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;