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 3BF2745BB6 for ; Wed, 23 Oct 2024 23:19:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35AF340261; Wed, 23 Oct 2024 23:19:44 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id 7E8F8432DA for ; Wed, 23 Oct 2024 23:19:42 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-43155abaf0bso2259525e9.0 for ; Wed, 23 Oct 2024 14:19:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729718382; x=1730323182; 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=AWUiOKlCD8MRBnoq1dIBrIs0ul/RQ8awJThFuFxnz9U=; b=V86xTAaNO0Xcbd3YHMDNthxPmi+qbpvX0pPEe8gFZmqabV45l63gi40HTanjg7sdOG 3CWwtoNJ7ORN0laKc0vriZmzl7nauOokjsJlr8UDgP1anxX5KOK8ComFK15RkOvrRTmN eWZu7J/83MEt8cl6pGo5RisuKkwxWUOSgT/8mP5qfuDX4iwcw1CLC0PFdiPzWEnQs6QL eoZc2ViDcJwSIV88juyLr7PW+FTB7cEMo26d/rw2WsidGeO31e95Q5m6gddyxEFjlNYi ODIhGaw84jVLpCSevv9AHf1hTLBGBAT3s70K53gwOT7t75CwZkqphq4KSRjHbcY38qGI 1Ojg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729718382; x=1730323182; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AWUiOKlCD8MRBnoq1dIBrIs0ul/RQ8awJThFuFxnz9U=; b=URhdeJp2yjRD4UsAcmmzvuqwwhZ2IsP3m2CTqALJo1zxjY18q9z1oclG4LxHpdNKn4 ZQdxRSt6FGpHS8n4OB3GwRJSryiVcXYYM+0JvRYlQXqAL+z+ReOnpk6yWiLErZAbjwGJ rFKWSDCGZF6kq2G/paSQ9GeJmx+c136wglP4s6mFUOGfEzMk7aHZtXrcxebvFCLk9FEt Iu5HgqAdYNuTZgkzCVIXw1a8aFBAH3Ujc+J7Biy2iVb+hDReMnfHms00C9FPGs459c0s npqxYIexAIu4o08m3JuPEr9zBfqorRc85Xvlwpo8U164bHSvQRLvrBvlMyVWmYfuY4HE fsuA== X-Forwarded-Encrypted: i=1; AJvYcCVko3qC3gMXlkDcUZb95W/UwED5nGlTNVnfHRQ+xUZtYGV7rHsV/aMksrGeP1uNZ2gNF332o2k=@dpdk.org X-Gm-Message-State: AOJu0YzBlDtOFvxXSAJDkXm1C5HOW2CXTcZ8oAfZ+yDINl6IGmpWAL+M iZfuyF0W0jJ9HzxUptUyL21xuyz1cvmhPP5s7Dveh3jVhpTaxuyPvnJ08BCV X-Google-Smtp-Source: AGHT+IEHi8xeAzvp1zsObYCCo9Y5smDu1J8DRPJkEaK/E9xEjHuemWtVqgbcZwrwdPd3UgCs5nxOPw== X-Received: by 2002:a05:600c:4fce:b0:431:5533:8f0c with SMTP id 5b1f17b1804b1-4318425fb2bmr35037955e9.29.1729718381915; Wed, 23 Oct 2024 14:19:41 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43186beffbcsm26795135e9.28.2024.10.23.14.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 14:19:41 -0700 (PDT) From: luca.boccassi@gmail.com To: Radoslaw Tyl Cc: Anatoly Burakov , Bruce Richardson , dpdk stable Subject: patch 'net/i40e/base: fix repeated register dumps' has been queued to stable release 22.11.7 Date: Wed, 23 Oct 2024 22:16:22 +0100 Message-ID: <20241023211704.1216956-42-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241023211704.1216956-1-luca.boccassi@gmail.com> References: <20241023211704.1216956-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.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/25/24. 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/92dd2403039e0eb50d8304f525a407aa9f3018c4 Thanks. Luca Boccassi --- >From 92dd2403039e0eb50d8304f525a407aa9f3018c4 Mon Sep 17 00:00:00 2001 From: Radoslaw Tyl Date: Mon, 2 Sep 2024 10:54:33 +0100 Subject: [PATCH] net/i40e/base: fix repeated register dumps [ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ] Currently, when registers are dumped, the data inside them is changed, so repeated dumps lead to unexpected results. Fix this by making register list read-only. Fixes: 8db9e2a1b232 ("i40e: base driver") Signed-off-by: Radoslaw Tyl Signed-off-by: Anatoly Burakov Acked-by: Bruce Richardson --- drivers/net/i40e/base/i40e_diag.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/base/i40e_diag.c b/drivers/net/i40e/base/i40e_diag.c index b3c4cfd3aa..4ca102cdd5 100644 --- a/drivers/net/i40e/base/i40e_diag.c +++ b/drivers/net/i40e/base/i40e_diag.c @@ -55,7 +55,7 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw, return I40E_SUCCESS; } -static struct i40e_diag_reg_test_info i40e_reg_list[] = { +static const struct i40e_diag_reg_test_info i40e_reg_list[] = { /* offset mask elements stride */ {I40E_QTX_CTL(0), 0x0000FFBF, 1, I40E_QTX_CTL(1) - I40E_QTX_CTL(0)}, {I40E_PFINT_ITR0(0), 0x00000FFF, 3, I40E_PFINT_ITR0(1) - I40E_PFINT_ITR0(0)}, @@ -81,28 +81,28 @@ enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw) { enum i40e_status_code ret_code = I40E_SUCCESS; u32 reg, mask; + u32 elements; u32 i, j; for (i = 0; i40e_reg_list[i].offset != 0 && ret_code == I40E_SUCCESS; i++) { + elements = i40e_reg_list[i].elements; /* set actual reg range for dynamically allocated resources */ if (i40e_reg_list[i].offset == I40E_QTX_CTL(0) && hw->func_caps.num_tx_qp != 0) - i40e_reg_list[i].elements = hw->func_caps.num_tx_qp; + elements = hw->func_caps.num_tx_qp; if ((i40e_reg_list[i].offset == I40E_PFINT_ITRN(0, 0) || i40e_reg_list[i].offset == I40E_PFINT_ITRN(1, 0) || i40e_reg_list[i].offset == I40E_PFINT_ITRN(2, 0) || i40e_reg_list[i].offset == I40E_QINT_TQCTL(0) || i40e_reg_list[i].offset == I40E_QINT_RQCTL(0)) && hw->func_caps.num_msix_vectors != 0) - i40e_reg_list[i].elements = - hw->func_caps.num_msix_vectors - 1; + elements = hw->func_caps.num_msix_vectors - 1; /* test register access */ mask = i40e_reg_list[i].mask; - for (j = 0; j < i40e_reg_list[i].elements && - ret_code == I40E_SUCCESS; j++) { + for (j = 0; j < elements && ret_code == I40E_SUCCESS; j++) { reg = i40e_reg_list[i].offset + (j * i40e_reg_list[i].stride); ret_code = i40e_diag_reg_pattern_test(hw, reg, mask); -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-10-23 22:16:42.118462619 +0100 +++ 0042-net-i40e-base-fix-repeated-register-dumps.patch 2024-10-23 22:16:40.491942429 +0100 @@ -1 +1 @@ -From efc6a6b1facfa160e5e72f55893a301a6b27c628 Mon Sep 17 00:00:00 2001 +From 92dd2403039e0eb50d8304f525a407aa9f3018c4 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org