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 8AE1048B59 for ; Thu, 20 Nov 2025 13:45:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8628240262; Thu, 20 Nov 2025 13:45:22 +0100 (CET) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mails.dpdk.org (Postfix) with ESMTP id 4FD46402D4 for ; Thu, 20 Nov 2025 13:45:21 +0100 (CET) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4779adb38d3so6365335e9.2 for ; Thu, 20 Nov 2025 04:45:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763642721; x=1764247521; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=O8gJLFlwX/a0qzLm3YK1prMhsut8b/0eyS3s4ft+lqA=; b=cBX5SUmk9zQRdc1cqOqtAXYb7I+x7zAbqYD5oh7C305kPPD0LHuitIGnvlUPLtj7zT RdChvTj3diGi6Tymy3OCW2lAimgY+MabQg/sXyH/xc6GuT2PC8JjFgMiwVOCpblLtzE8 qRh5Ahm68OHro8OFqf+e3aktN8D6qvtqCpPIh/FTS/BPCK9bdh6C2yJFPuR9fA5IRBsU RPtTf67BMIdxkDJn+HQ8P5HxuzHQgudVvkQxr5/ct5ysGw8NBYGoxcXAcAXiURn1sXZ2 kyUci5JcT1m6BsfIHiNHYXIiJjif6vqtsjX7oboFM72ND+BKHtba0kDPh1bXwCpu5PBM 3KiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763642721; x=1764247521; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=O8gJLFlwX/a0qzLm3YK1prMhsut8b/0eyS3s4ft+lqA=; b=FJHUfLjtAs8e7B1eWbWHC3XF8nvuCDrDJcINsaPtKF35/vhEoOu6KO8N5oIr4FuSBb loiozdd5hLquymKb6Egqi4M8bQDmujdvUG61IkIGPxnpL8hPQDJ/HVFvoA8g3t3psb+q E+v0vMXRpw0xMYtrGTwIdWr6v5XmoacXkgCN0NhNDBPaXUPBYHHGHHdIoGuH3cKS2oHj 9qdgb6b3gj/Dn3jeW+rbWTWabw1sYD8yRmGlCmtLEwOd68PIRdllwgDpJ+LqTr+5GE1D 9lBa1kHXSUIBnniSfSkOp+N6CopEWT9GapHl/lJSX8Ru3C6OHq4F0tNiEryPplYcBC8L muLg== X-Forwarded-Encrypted: i=1; AJvYcCWYzz4IifUVBQ2A2idifZotriye6OyVVrvv0c7oCYbymkunFgaskGDQGgWKWeKsfeuj3Fok+BQ=@dpdk.org X-Gm-Message-State: AOJu0YxGp/NsoVd3/tN38ZBBOTYQpziUmbrRgcSiPZ8ZF4sJnbFDgcMX n7LV4EkNMFUrI1GsIfs2qhwZbK3S4LWSh5ek+pNDkXYB3Zex8JSRqoqH4mv9JdFT X-Gm-Gg: ASbGncuyOBCpt6ZTMPHwoe+BgcrTNltM93IyftSbXAap03usFZoGl0NsO51x6Qwpocw tWbyFmF0ggtxskzAwoRHbly/Hokwq1H7rebzd7jku7R6youKBVA26N3PLLT3VFLYqadYHk++TZs VZTMytRtBPY3vwHVc9xFvlr1Z2iat0UHaIeeJqSCufuDl+eJk1drrf+WNM+EDBjudnagCbKVhE+ gb0IgpB+zja9lA1keuN4DVv16obAgOG8ateDMJCyThgtVqP7RBiXQC8Hj2Qp8pBY4XcvtLHE8Se t72kJDzyEJ3/XN7mrU1A+3clokP2HhqMLCvzqv0KlZnuQC4Ijkcof3SUfy/gImY1DKNL1RN0Ny+ K419L33taGDBUL2ugEW8qV6KBDsUFgrkAoB+n0gCH5HbZFTbmH5WkiPiReMo+6SCVExl9doUhlY I3c3qmpgXkm2A6AVF0 X-Google-Smtp-Source: AGHT+IFvLB6+PpbuIzdVVJ8b2TxXYUG21FR8S7p8wcu7FuoPmkBJK50J4nxMLW9FKVhylfIgWtTNnQ== X-Received: by 2002:a05:600c:3b01:b0:477:942:7521 with SMTP id 5b1f17b1804b1-477b8a50cf7mr28597385e9.14.1763642720796; Thu, 20 Nov 2025 04:45:20 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f372:8d1a:399f:e8a2]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-42cb7fb9190sm5468786f8f.33.2025.11.20.04.45.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 04:45:20 -0800 (PST) From: luca.boccassi@gmail.com To: Zhichao Zeng Cc: Bruce Richardson , dpdk stable Subject: patch 'net/ice: fix statistics' has been queued to stable release 22.11.11 Date: Thu, 20 Nov 2025 12:44:36 +0000 Message-ID: <20251120124514.757933-4-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251120124514.757933-1-luca.boccassi@gmail.com> References: <20251112165308.1618107-49-luca.boccassi@gmail.com> <20251120124514.757933-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.11.11 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/22/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/7759b183a64b85b6db7b1a44a866c127a472afd8 Thanks. Luca Boccassi --- >From 7759b183a64b85b6db7b1a44a866c127a472afd8 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 591d067851..fb92d81e7f 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -5299,10 +5299,16 @@ ice_stat_update_40(struct ice_hw *hw, uint64_t *stat) { 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) *offset = new_data; -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-11-20 12:44:12.940659364 +0000 +++ 0004-net-ice-fix-statistics.patch 2025-11-20 12:44:12.774087887 +0000 @@ -1 +1 @@ -From 9ac3d9cc61bc70fdc6dff14969a7111a673be932 Mon Sep 17 00:00:00 2001 +From 7759b183a64b85b6db7b1a44a866c127a472afd8 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 -@@ -6417,10 +6417,16 @@ 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 591d067851..fb92d81e7f 100644 +--- a/drivers/net/ice/ice_ethdev.c ++++ b/drivers/net/ice/ice_ethdev.c +@@ -5299,10 +5299,16 @@ ice_stat_update_40(struct ice_hw *hw,