From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3EDDE48B69 for ; Fri, 21 Nov 2025 12:24:11 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35D5140395; Fri, 21 Nov 2025 12:24:11 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 95EDE402F0 for ; Fri, 21 Nov 2025 12:24:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763724249; 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: in-reply-to:in-reply-to:references:references; bh=Yx2TPbJhHcL1HeI5qwiu7byhbuflHIRVGiaTBJGNpdI=; b=G3OHLkYgPkOM6D8l7LLHKYAPEMcXQKQEdPt/WlWEt6pflda9LEKf6CulZ5OYCm5kxae2a1 VdtZ22NsLDpsVISOO8F3ezMPs2wtC/e4DhNFJf3gdBeCUVLONocVMuPrDIkO3oePATrolD V8lhNoW8pKbzDGRMwmjzveOL6VPr0vc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-645-F6stQxHsPf2HqD0Q61V2GQ-1; Fri, 21 Nov 2025 06:24:06 -0500 X-MC-Unique: F6stQxHsPf2HqD0Q61V2GQ-1 X-Mimecast-MFC-AGG-ID: F6stQxHsPf2HqD0Q61V2GQ_1763724245 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3DCCB195608F; Fri, 21 Nov 2025 11:24:05 +0000 (UTC) Received: from rh.redhat.com (unknown [10.42.28.165]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C23F230044E9; Fri, 21 Nov 2025 11:24:03 +0000 (UTC) From: Kevin Traynor To: Zhichao Zeng Cc: Bruce Richardson , dpdk stable Subject: patch 'net/ice: fix statistics' has been queued to stable release 24.11.4 Date: Fri, 21 Nov 2025 11:20:55 +0000 Message-ID: <20251121112128.485623-71-ktraynor@redhat.com> In-Reply-To: <20251121112128.485623-1-ktraynor@redhat.com> References: <20251121112128.485623-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Zo6rQArpR8VeXMpE-C6fO28aMusAoYUAA_xjzCnQpNI_1763724245 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/26/25. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/1e30fd1b8e0ec3383b899f86310076a3a2099a51 Thanks. Kevin --- >From 1e30fd1b8e0ec3383b899f86310076a3a2099a51 Mon Sep 17 00:00:00 2001 From: Zhichao Zeng Date: Thu, 13 Nov 2025 15:47:10 +0800 Subject: [PATCH] net/ice: fix statistics [ upstream commit 9ac3d9cc61bc70fdc6dff14969a7111a673be932 ] The statistics contain 40 bits. The lower 32 bits are read first, followed by the upper 8 bits. In some cases, after reading the lower 32 bits, a carry occurs from the lower bits, which causes the final statistics to be incorrect. This commit fixes this issue. Fixes: a37bde56314d ("net/ice: support statistics") Signed-off-by: Zhichao Zeng Acked-by: Bruce Richardson --- drivers/net/ice/ice_ethdev.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index ada0558863..4f122f946c 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -5968,8 +5968,14 @@ ice_stat_update_40(struct ice_hw *hw, { uint64_t new_data; + uint32_t lo_old, hi, lo; - new_data = (uint64_t)ICE_READ_REG(hw, loreg); - new_data |= (uint64_t)(ICE_READ_REG(hw, hireg) & ICE_8_BIT_MASK) << - ICE_32_BIT_WIDTH; + do { + lo_old = ICE_READ_REG(hw, loreg); + hi = ICE_READ_REG(hw, hireg); + lo = ICE_READ_REG(hw, loreg); + } while (lo_old > lo); + + new_data = (uint64_t)lo; + new_data |= (uint64_t)(hi & ICE_8_BIT_MASK) << ICE_32_BIT_WIDTH; if (!offset_loaded) -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-21 11:05:11.789942447 +0000 +++ 0071-net-ice-fix-statistics.patch 2025-11-21 11:05:09.550201540 +0000 @@ -1 +1 @@ -From 9ac3d9cc61bc70fdc6dff14969a7111a673be932 Mon Sep 17 00:00:00 2001 +From 1e30fd1b8e0ec3383b899f86310076a3a2099a51 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9ac3d9cc61bc70fdc6dff14969a7111a673be932 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ - drivers/net/intel/ice/ice_ethdev.c | 12 +++++++++--- + drivers/net/ice/ice_ethdev.c | 12 +++++++++--- @@ -23,5 +24,5 @@ -diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c -index c1d92435d1..c721d135f5 100644 ---- a/drivers/net/intel/ice/ice_ethdev.c -+++ b/drivers/net/intel/ice/ice_ethdev.c -@@ -6418,8 +6418,14 @@ ice_stat_update_40(struct ice_hw *hw, +diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c +index ada0558863..4f122f946c 100644 +--- a/drivers/net/ice/ice_ethdev.c ++++ b/drivers/net/ice/ice_ethdev.c +@@ -5968,8 +5968,14 @@ ice_stat_update_40(struct ice_hw *hw,