From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8889DA051C for ; Tue, 11 Feb 2020 12:28:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 80C3F1BE9E; Tue, 11 Feb 2020 12:28:59 +0100 (CET) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 4A5E71BE9E for ; Tue, 11 Feb 2020 12:28:58 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id a5so3053463wmb.0 for ; Tue, 11 Feb 2020 03:28:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0EbOjyPeymTxhoIQnqUnbiZS5WKEk1tAuTMt55hO43g=; b=VdIKF1qm77UJHfkq6l1N37MO9rl2wcpOwrflRUgUpznCCf8xK136Zdri22sXB0bn2d efDbpwv8Dv6oLpomyUjK6iH6gazmTn7x435UjoHsu9o/TGFcICGlCAZgzHqRe2vxOIUw i/yXN1h3X3GYVw2Q9HRCEy5skRS8KIR5WEFG9lrdKcmmWzOOIicD3Gq6l2B9fDvbXGmI X50f/mPkRGurUhfs5G4pMRjSoaumZpPgb5w4IdPGSFgJvb/DyZSQY+deIKAR3wr118Hk C9D0pszQTgSSrOaRxuSFOeVfFAWIig+64Te0OhrRd8QxABULTcgyvG4umbg4Ijck6G0Z t6Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0EbOjyPeymTxhoIQnqUnbiZS5WKEk1tAuTMt55hO43g=; b=O4dOi541muYhwMqM0gvRhu49dqHi2XVqUeOzKNObyNEtb7k7A+A9qPDM/6P3pEFJxk q94EEbakPNstgOBrqh5+o8epnDqltHsjjV8TmdVRPV4RamS9lbwy5v81a42N6Y9/azys +2tJqKxKt6y46cfBG+qlsTEIPzZfvTk3Qwb31p2w8rm53MUYJsCm1qPE2HwgMVoXEvuz kwQEQQfq3/JS/FKXNgYLT2oRWPv8BI6yGarTHgjw0yKPp/5ZSIbYOtExDJy9bAYVdy74 hftYrtFpMJym1JGq9bvPVGvS3pn1+A+agN68BENPFqVHMPADa8X5XaBpqPU01NW0wLpx gKBA== X-Gm-Message-State: APjAAAUHz4xB8J0kopH0vz5Q+8xw2Agwcazd+fFyKpmRDWgDq3peqFBY 1RqgFkBa87g9tBz5F7i+O/4= X-Google-Smtp-Source: APXvYqwlKBwDMLChcMEckiYFhOaKp1YfeRO+iJul1OkQnd8xtADJR51b5eBpyp2QrLUZNqMet11g5A== X-Received: by 2002:a1c:a404:: with SMTP id n4mr5176105wme.186.1581420537064; Tue, 11 Feb 2020 03:28:57 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v14sm4970776wrm.28.2020.02.11.03.28.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:28:56 -0800 (PST) From: luca.boccassi@gmail.com To: Chengwen Feng Cc: Wei Hu , dpdk stable Date: Tue, 11 Feb 2020 11:20:29 +0000 Message-Id: <20200211112216.3929-83-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix triggering reset procedure in slave process' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. 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. Thanks. Luca Boccassi --- >From 9da2ae2be7afc47b6b5ccbcf6a79ee93a15a440f Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Thu, 9 Jan 2020 11:15:59 +0800 Subject: [PATCH] net/hns3: fix triggering reset procedure in slave process [ upstream commit a1f381ad5349af335bda4b7152b7c6fd5f56573a ] Currently, reset related operations can only be performed in the primary process and are not allowed in the slave process in hns3 PMD driver. In the internal function interface named hns3_cmd_send used for communication between driver and firmware, if the wrong head value is detected in the static subfunction hns3_cmd_csq_clean, driver will trigger a function level reset to make the hardware work normally again. This patch adds check condition to prevent triggering reset procedure in the slave process to avoid failure. Fixes: 2790c6464725 ("net/hns3: support device reset") Signed-off-by: Chengwen Feng Signed-off-by: Wei Hu (Xavier) --- drivers/net/hns3/hns3_cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/hns3/hns3_cmd.c b/drivers/net/hns3/hns3_cmd.c index 65a5af8e4f..5ec3dfe016 100644 --- a/drivers/net/hns3/hns3_cmd.c +++ b/drivers/net/hns3/hns3_cmd.c @@ -215,12 +215,12 @@ hns3_cmd_csq_clean(struct hns3_hw *hw) head = hns3_read_dev(hw, HNS3_CMDQ_TX_HEAD_REG); if (!is_valid_csq_clean_head(csq, head)) { - struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); hns3_err(hw, "wrong cmd head (%u, %u-%u)", head, csq->next_to_use, csq->next_to_clean); - rte_atomic16_set(&hw->reset.disable_cmd, 1); - - hns3_schedule_delayed_reset(hns); + if (rte_eal_process_type() == RTE_PROC_PRIMARY) { + rte_atomic16_set(&hw->reset.disable_cmd, 1); + hns3_schedule_delayed_reset(HNS3_DEV_HW_TO_ADAPTER(hw)); + } return -EIO; } -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.840127874 +0000 +++ 0083-net-hns3-fix-triggering-reset-procedure-in-slave-pro.patch 2020-02-11 11:17:38.520003591 +0000 @@ -1,8 +1,10 @@ -From a1f381ad5349af335bda4b7152b7c6fd5f56573a Mon Sep 17 00:00:00 2001 +From 9da2ae2be7afc47b6b5ccbcf6a79ee93a15a440f Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Thu, 9 Jan 2020 11:15:59 +0800 Subject: [PATCH] net/hns3: fix triggering reset procedure in slave process +[ upstream commit a1f381ad5349af335bda4b7152b7c6fd5f56573a ] + Currently, reset related operations can only be performed in the primary process and are not allowed in the slave process in hns3 PMD driver. @@ -15,7 +17,6 @@ the slave process to avoid failure. Fixes: 2790c6464725 ("net/hns3: support device reset") -Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Signed-off-by: Wei Hu (Xavier)