From nobody Thu Sep 17 05:59:31 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 4hllT52qgqz6sTCy for ; Thu, 17 Sep 2026 05:59:37 +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 4hllT506mtz4Vpj for ; Thu, 17 Sep 2026 05:59:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789624777; 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=aC/rToYG5f/M5wyenQITaxSF+7jwZtKwF3A6P5+4+tI=; b=UID4YiGcBcu5hT86k7UizwULhRYCbFO2tbcRAKoohABQlo5JiOc8HH4Xbaey2FpjeN6rIj HokNAQ7ytv2c7YNzzm0nXTsRPG4D4GtwjcAVrNwUzSVYWnmKKuvq8TjpWLl6HziuZXoiqv gDhg+vE2CAIw+Q6JBpfP7e8Jxe/n6inro3NY/LjRP3MH4/VTrfOKqssdLo/mL7xfrK7NYj 2L4WkRttK8BoSZjtQW6jAH+9ROR3OrBgZQQfMOOHbjgDrMromF8hIN5dStRNI0N6dJ0eIC j2WM/01jPfoFCDllQx0ywBh9IQiG+z3bO+y2qgdjt9DMc3i/HYcMMPmzEwqtAg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789624777; b=UHHa81Y4GM+FVK15BTZh8R1fftWcEvcHvE6yg4x0SfTdn5czK0yL1AOqMeg32NdTMEhrAt O6zef+z5zc0iD2+VUSMsxQlEyJcpXk9LAjwEJZ10YHS/m9okIt9/I0EgMHvSg5XXKQsyP6 4hEzkaS/Di0g3RyspgLJQmOuHYFCVh7eaQ6JdceiMdGdzrHEiSp9LtaBzaY8ZaSi479nJ5 kYPg7tGR0pGfoCwYeNMBv/ZBE34rVnAmRpiy41+9eBR9xRPXfTVEQqX3XBwURB7m8KNTXA uCJzIbdjhyoMWBrlU3+KKMNYwxHIe5sV+zCOyOnilTuKH4OtOq4rPbZXg0GJ5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789624777; 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=aC/rToYG5f/M5wyenQITaxSF+7jwZtKwF3A6P5+4+tI=; b=WFUHSeILfVWLWWhWD6dERvkRCrKDwO1OjD4ud0YGnK3r5H0b+Y8Hp9MZotKhSG5AkkPK3L +ItEbKtKBP+uFFhUMjRDa09fZPBwwpTeaYbW0MOrkLljr78JFlI2m3rXGj3OM3wAXtaH4e bWzpdwVbbwTV3/DrFbOOGm8hOZRZ8Z4x+1oj6x4kPN7M3lVV/GawGw9RO7SPhGA4q/4byE qRKhPFv5PpibEVOf9uPDQ2pE+WmgiBuj6dZtj/EoTpLsaxt1jqee0URZyK0PuZknUmNKTK qH6qWX+Aee3ZAq+obOjPa280Y30x0akz1eY0d0jYic3noVDRmiRJsjd3C6RBbw== 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 4hllT45ZwnzK5w for ; Thu, 17 Sep 2026 05:59:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 21cdb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 17 Sep 2026 05:59:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 444168adbe52 - main - ixl: Tie statistics baselines to hardware resource epochs 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: 444168adbe5217ea9b73773e42c60bf75fb7a6fd Auto-Submitted: auto-generated Date: Thu, 17 Sep 2026 05:59:31 +0000 Message-Id: <6aab81c3.21cdb.629c51dd@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=444168adbe5217ea9b73773e42c60bf75fb7a6fd commit 444168adbe5217ea9b73773e42c60bf75fb7a6fd Author: Kevin Bowling AuthorDate: 2026-09-03 10:58:30 +0000 Commit: Kevin Bowling CommitDate: 2026-09-17 05:58:31 +0000 ixl: Tie statistics baselines to hardware resource epochs Raw VSI statistics belong to the firmware-assigned counter index and are reset when firmware recreates the VSI. Reusing a baseline across either event makes a counter decrease look like a full width rollover. Reset the PF and main VSI baselines when rebuilding hardware resources. Start a new baseline when firmware assigns a different PF counter index and whenever it allocates a VF VSI. Ordinary interface reinits which retain the hardware resources continue to retain their statistics. This follows the lifecycle used by ice without placing an unconditional statistics reset in ixl_initialize_vsi(), which also runs during ordinary iflib initialization. MFC after: 2 weeks Sponsored by: BBOX.io Differential Revision: https://reviews.freebsd.org/D59337 --- sys/dev/ixl/ixl_pf_iflib.c | 11 ++++++++++- sys/dev/ixl/ixl_pf_iov.c | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixl/ixl_pf_iflib.c b/sys/dev/ixl/ixl_pf_iflib.c index 723b5b635220..17802e28d613 100644 --- a/sys/dev/ixl/ixl_pf_iflib.c +++ b/sys/dev/ixl/ixl_pf_iflib.c @@ -500,7 +500,13 @@ ixl_initialize_vsi(struct ixl_vsi *vsi) ctxt.info.queueing_opt_flags |= I40E_AQ_VSI_QUE_OPT_TCP_ENA; } #endif - /* Save VSI number and info for use later */ + /* + * Save the VSI number and info for later. A changed counter index + * begins a new statistics epoch. + */ + if (vsi->stat_offsets_loaded && + vsi->info.stat_counter_idx != ctxt.info.stat_counter_idx) + ixl_vsi_reset_stats(vsi); vsi->vsi_num = ctxt.vsi_number; bcopy(&ctxt.info, &vsi->info, sizeof(vsi->info)); @@ -1030,6 +1036,9 @@ ixl_rebuild_hw_structs_after_reset(struct ixl_pf *pf, bool is_up) error = EIO; goto ixl_rebuild_hw_structs_after_reset_err; } + /* Firmware has rebuilt the port and VSI counter resources. */ + ixl_pf_reset_stats(pf); + ixl_vsi_reset_stats(vsi); error = i40e_aq_set_phy_int_mask(hw, IXL_DEFAULT_PHY_INT_MASK, NULL); diff --git a/sys/dev/ixl/ixl_pf_iov.c b/sys/dev/ixl/ixl_pf_iov.c index 29f0f1fd839e..8c985d622cfe 100644 --- a/sys/dev/ixl/ixl_pf_iov.c +++ b/sys/dev/ixl/ixl_pf_iov.c @@ -212,6 +212,8 @@ ixl_vf_alloc_vsi(struct ixl_pf *pf, struct ixl_vf *vf) } memcpy(&vf->vsi.info, &vsi_ctx.info, sizeof(vf->vsi.info)); + /* A newly allocated hardware VSI starts a new statistics epoch. */ + ixl_vsi_reset_stats(&vf->vsi); return (0); fail: