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 49FCE45DB9 for ; Wed, 27 Nov 2024 18:20:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4092F4060C; Wed, 27 Nov 2024 18:20:52 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 190A64066C for ; Wed, 27 Nov 2024 18:20:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728050; 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=qgDYMiEFtC1ncwokMkTc0dwf+XJhtIdVpfejh2QEUok=; b=Yi02EMJfb8FAJpFuG1ECWjx4/QtNr2ThF1Ov4Z2Qw+0PcsTX6s+mwVSQhSdW+D0Tzh2PyJ hxMnMAXqaSZBQrJjmL6a6squtDiZvAoznyw89G2OuepAVodwr/FCMImD9BsMMJ4WreBlwo Vh9+i6ykhEEwri9bOEJirB1+KbIDluc= Received: from mx-prod-mc-04.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-422-Bs7K5LWRMjm1YlLCdf9pAA-1; Wed, 27 Nov 2024 12:20:49 -0500 X-MC-Unique: Bs7K5LWRMjm1YlLCdf9pAA-1 X-Mimecast-MFC-AGG-ID: Bs7K5LWRMjm1YlLCdf9pAA 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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 172421955F57; Wed, 27 Nov 2024 17:20:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 828F53003B71; Wed, 27 Nov 2024 17:20:46 +0000 (UTC) From: Kevin Traynor 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 21.11.9 Date: Wed, 27 Nov 2024 17:17:43 +0000 Message-ID: <20241127171916.690404-36-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-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: AV3yziEJDbxamPt60daDmLexQKqYm7lAIRTpHGSiNeo_1732728048 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 21.11.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/c4abb2d3fd9f1a383bf237fea5711f9629dbe789 Thanks. Kevin --- >From c4abb2d3fd9f1a383bf237fea5711f9629dbe789 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 @@ -56,5 +56,5 @@ static enum i40e_status_code i40e_diag_reg_pattern_test(struct i40e_hw *hw, } -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)}, @@ -82,4 +82,5 @@ 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; @@ -87,8 +88,9 @@ enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw) 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) || @@ -97,11 +99,9 @@ enum i40e_status_code i40e_diag_reg_test(struct i40e_hw *hw) 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); -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:39.429319239 +0000 +++ 0036-net-i40e-base-fix-repeated-register-dumps.patch 2024-11-27 17:17:38.201269248 +0000 @@ -1 +1 @@ -From efc6a6b1facfa160e5e72f55893a301a6b27c628 Mon Sep 17 00:00:00 2001 +From c4abb2d3fd9f1a383bf237fea5711f9629dbe789 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit efc6a6b1facfa160e5e72f55893a301a6b27c628 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org