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 2B524432DA for ; Wed, 8 Nov 2023 20:26:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2582342DF3; Wed, 8 Nov 2023 20:26:14 +0100 (CET) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mails.dpdk.org (Postfix) with ESMTP id 38DA642DF3 for ; Wed, 8 Nov 2023 20:26:13 +0100 (CET) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-507bd64814fso30753e87.1 for ; Wed, 08 Nov 2023 11:26:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699471573; x=1700076373; 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=q0SCqCUnIg5IujAF9T3H82yCfPX0O10K20rnaAYO9Xs=; b=HY5UlQEXXEj4nWzZptJCHMsu57ukfqC0L/Ot0D0oJug+QcfJ4bLxCneEQPJrti8gT8 rwWfazwhxkpHJaKkObKCFkY0PfYmArApC1zKMpHN8UaB2GCpAboS1xjej+7NXK0Ufpmd /Okv9IP/TVIk2081IaJyKQbEuzkb7r91M+m5Uvk+8mLzagsUHyUq5goIJX5dnOurZXBT Pb8tfwB1KeL2QSs579bn4AqPQQDtJv/s1xYuZlFtMlKdlBwCgSjkcNw3EalN5qAIruPv cvmIeSR7uDE91cehEFNvIJOn+fyJj7pkbVxyfYMsY/PDD127Bu06m77UbBmB/4JFBnLY nXrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699471573; x=1700076373; 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=q0SCqCUnIg5IujAF9T3H82yCfPX0O10K20rnaAYO9Xs=; b=AG/0ZPvwHckJ5VIYVHJPJaK5Nb7I61qQKsxO0lL7QZGuJnviCR8EaOFOiaAu/VdikA jkxawL1CxfAg9D2/W5OAPyvSKTlR9mrkBwOTCuwYYiqbweOsTFu8iAcEF+NxupnRAKsU DSF9tDGDZGxqCTfk0ibvDy0R6yXiGaDZ3ZiB2Lx98osOOC6KzfK+OozvsN6w7GxXwLzN C/WXl5m3gBv/oSFShgSiFmPIWde/AfrNz3R2FiPg3ZWrmb28Z+xBpnyoSCwZ/xXCyNfm a0x/ArYakGju44GNqpaRc6Yp6cG7dBQn3FdjzuiAp1hE/8o+rmrWXOp1/ovCpKdVoXcl e1Rw== X-Gm-Message-State: AOJu0YwDT5yxhHU4yfA1CC0h/wxIqW+HxFElASDqLGD24IV94ed86YUI JnkyFHsBdTwTaxRgqMSQqrY= X-Google-Smtp-Source: AGHT+IGKUcM2HoibwTFmHuvPuEbQ+AN0KQzDfsa+UZ6+eaqR7+059TyOX9lyKrC9aBNxm6nIw1BOTQ== X-Received: by 2002:a05:6512:3b9e:b0:503:1be5:24eb with SMTP id g30-20020a0565123b9e00b005031be524ebmr2442976lfv.50.1699471572609; Wed, 08 Nov 2023 11:26:12 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id e12-20020adffd0c000000b0032d893d8dc8sm5679245wrr.2.2023.11.08.11.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 11:26:12 -0800 (PST) From: luca.boccassi@gmail.com To: Dengdui Huang Cc: dpdk stable Subject: patch 'net/hns3: remove reset log in secondary' has been queued to stable release 20.11.10 Date: Wed, 8 Nov 2023 19:25:11 +0000 Message-Id: <20231108192535.922238-13-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108192535.922238-1-luca.boccassi@gmail.com> References: <20231018235930.3144-41-luca.boccassi@gmail.com> <20231108192535.922238-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 20.11.10 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/10/23. 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/aca18a766ad56e413a287316c4dea56eea6438ce Thanks. Luca Boccassi --- >From aca18a766ad56e413a287316c4dea56eea6438ce Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Fri, 27 Oct 2023 14:09:43 +0800 Subject: [PATCH] net/hns3: remove reset log in secondary [ upstream commit 5394df455749f60614a19d791d1d73c26b74dea1 ] The reset event is checked and done in primary. And the secondary doesn't check and display reset log. There is a patch to remove the check code for secondary. please see commit a8f1f7cf1b42 ("net/hns3: fix crash when secondary process access FW") This patch removes the redundant log print of reset. Fixes: a8f1f7cf1b42 ("net/hns3: fix crash when secondary process access FW") Signed-off-by: Dengdui Huang --- drivers/net/hns3/hns3_ethdev.c | 11 +++++------ drivers/net/hns3/hns3_ethdev_vf.c | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index b898c7b5a3..2acb2a56d6 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -5481,14 +5481,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns) enum hns3_reset_level reset; /* - * Check the registers to confirm whether there is reset pending. - * Note: This check may lead to schedule reset task, but only primary - * process can process the reset event. Therefore, limit the - * checking under only primary process. + * Only primary can process can process the reset event, + * so don't check reset event in secondary. */ - if (rte_eal_process_type() == RTE_PROC_PRIMARY) - hns3_check_event_cause(hns, NULL); + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return false; + hns3_check_event_cause(hns, NULL); reset = hns3_get_reset_level(hns, &hw->reset.pending); if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { hns3_warn(hw, "High level reset %d is pending", reset); diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 8937e73305..cc04659369 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2308,14 +2308,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) return false; /* - * Check the registers to confirm whether there is reset pending. - * Note: This check may lead to schedule reset task, but only primary - * process can process the reset event. Therefore, limit the - * checking under only primary process. + * Only primary can process can process the reset event, + * so don't check reset event in secondary. */ - if (rte_eal_process_type() == RTE_PROC_PRIMARY) - hns3vf_check_event_cause(hns, NULL); + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return false; + hns3vf_check_event_cause(hns, NULL); reset = hns3vf_get_reset_level(hw, &hw->reset.pending); if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { hns3_warn(hw, "High level reset %d is pending", reset); -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-08 19:23:52.670397316 +0000 +++ 0013-net-hns3-remove-reset-log-in-secondary.patch 2023-11-08 19:23:51.769396209 +0000 @@ -1 +1 @@ -From 5394df455749f60614a19d791d1d73c26b74dea1 Mon Sep 17 00:00:00 2001 +From aca18a766ad56e413a287316c4dea56eea6438ce Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 5394df455749f60614a19d791d1d73c26b74dea1 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 964f47f164..3bdce1fa4b 100644 +index b898c7b5a3..2acb2a56d6 100644 @@ -26 +27 @@ -@@ -5512,14 +5512,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns) +@@ -5481,14 +5481,13 @@ hns3_is_reset_pending(struct hns3_adapter *hns) @@ -44,2 +45,2 @@ - if (reset != HNS3_NONE_RESET && hw->reset.level != HNS3_NONE_RESET && - hw->reset.level < reset) { + if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { + hns3_warn(hw, "High level reset %d is pending", reset); @@ -47 +48 @@ -index 007f5d619f..5f3422d14e 100644 +index 8937e73305..cc04659369 100644 @@ -50 +51 @@ -@@ -1715,14 +1715,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) +@@ -2308,14 +2308,13 @@ hns3vf_is_reset_pending(struct hns3_adapter *hns) @@ -68,2 +69,2 @@ - if (hw->reset.level != HNS3_NONE_RESET && reset != HNS3_NONE_RESET && - hw->reset.level < reset) { + if (hw->reset.level != HNS3_NONE_RESET && hw->reset.level < reset) { + hns3_warn(hw, "High level reset %d is pending", reset);