From nobody Thu Sep 17 05:59:31 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 4hllSz6rx2z6sTcp for ; Thu, 17 Sep 2026 05:59:31 +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 4hllSz4tLRz4Vg3 for ; Thu, 17 Sep 2026 05:59:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789624771; 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=NLhoUsfyw3YkktqzLEc+2chK1/HcKXMj5JkW4QEq16k5UREJrOTQN1Y8JzwZ224ajFRA5j SDYg247E3pks0L/GQhdiYkY2osIx08QiEz8dF3cTR4ldrQf1xFBSiCPYlO7wE78owaJTyD scHPFiHPHL6gqVNZpj3vxPO2GGSxrgbwblyzM1rpezS1f2KCwqpqbGip3X5uENub4ktZD4 +4dYd9zV/AeQbHs85ps7A+rI35GVNvXXZ6lELoJ1/7l8TJl4Odtswm3GELGBbrEZsYRPBw DMZq+Bd0T6NNonIw4vQhHx3VXivv6VgzoW7giLNP1+cY+c074AwSs9vVAgM4fA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789624771; b=nA4Dq5//TAGo7xhDsbNno0pBxq4KH/91tpT7SLOH8/zvkWio4DkRepZpFomVlt9dkwVH1O CoV560nXtumi2ZYyYzfmXSTIm08GatuNxnz5/AmqABsT2v3Rz3DyjWtcFxeo1dXUv3gOm9 Cu8Jm70YStmayGvDDMhn2W/ixaov+ll531934zPFG0WzjzPrZAcehxJomhsIUHUBLuOR3V s80XNsIR26giIGkrk8llzzxkKsMUN4ADm2Pa4l+eQu8pizn605dwDTC+WWGd+TfvBMEGQy A+db3KQuXYgSRK7z4eH5RhnvVMfj10LBhEOKlNP7pwBMcMngBfWRdlxOkJF42A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789624771; 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=kUpjDQUEiY4YT/19XmltWcGj4dPmDlFA0HG+qF2u8OXzlgLcNLOCPRcoPcWMFM4E7w1Yju nvxB2WKCzbpWle2i0ZeQZe2AbOFbAUUU1DlbNZhwTYIkgpcWiowaFQPBdyf4eAcq4iWOUC 3Xrh3lvs35C9msI3kUi5D1Sbv0dbQ9mWqb1dJqnjSAYM1QYE6kVaI5WAj9EiYherz5vo/R zcwEvXgs70V3ZVgSG+Ae4F876p9wt91diR1Xi3UThsEpwpanJLCTpyNl9lPWxURfHQK2kF AX4Ughogc9AZ5It8lwjBjMnyJ9N93/oumGEDtPFsDm8o4HfKedfaFaHGG9Uh3Q== 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 4hllSz3yGfzKMT for ; Thu, 17 Sep 2026 05:59:31 +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 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: 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: