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 C6C96A0547 for ; Tue, 9 Feb 2021 11:36:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C01C5160712; Tue, 9 Feb 2021 11:36:30 +0100 (CET) Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mails.dpdk.org (Postfix) with ESMTP id 137D8160706 for ; Tue, 9 Feb 2021 11:36:29 +0100 (CET) Received: by mail-wr1-f53.google.com with SMTP id m13so20935304wro.12 for ; Tue, 09 Feb 2021 02:36:29 -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=brRwTMvZ1u8GXB9RkaAp7L0Kx9uB58PUH2URf+2W9Ac=; b=XurKOysCGZ8M2bKNiqJJDJh9h7xgBKk0HijuXpa8RSyuYxAjvvgL/2C587SbeKT5bV K50eRIHIlNRu8/Pq3XJEllTXX4xMtsNs/Si0Q7Y5OCBLWXI8uI1aUGNmaGj+qw2iFbLZ FuMsSDQX3T4PxwC5LTRxRt+mUmMFZvteMIu0soalf3+YFtn53CyMIwiJpUKVgtA+6zIO JIkvMX/0+OzcNjCItHLHpSM/aSfM7FSHHFXC/2ZSGpR259FlzyWJEM6Qqbtr8tq/I2ff EiFL/Ds0H5fUikMNWleMkQTHu4ioODH+X25I2HWfTyciKQ55vDJE/6yUawm2g6WwkFj5 GwoA== 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=brRwTMvZ1u8GXB9RkaAp7L0Kx9uB58PUH2URf+2W9Ac=; b=CFqAo4hrsZM12J0dmIc5sPi/0z/v3k+Covcw1bvmk5CQDLFRgI+ajzaAuvQWHlvbId wYoPWKQ+bA9wmIaTTZVd+/N1sdoDbqV4891GdoJrmeVGuOkytkf+N4VZOzJkq7w7TKbu eIo7UAAHO0xGw43BMRXYXw9pt2Y67MNEL1B/gaSSzBWqXcrpr63jYLhF8QUJ7BDW9c4T JrQEQ+fASzUmLowJcbeuvzEb50+s/iHxGEoCEVnXC38vb3MZcoKa1CiB9z1sosWmSOR5 qGndJsYeO2Alu9mFetbvHJBb6Ip7et/MDcGNjis4+ALnaNK7E6EhCaw02RVqFYgsv7Z3 bC9w== X-Gm-Message-State: AOAM533+oYu/XztKwqKJ+oqt8rPNPp5isV/9jPMfJHCDNq2J2ycRkMM0 zZ+2NHQj6r4i8jFIMYO0Zie4nfwGoLaJ+w== X-Google-Smtp-Source: ABdhPJxiYAcug1iBAeABLUyrXlgMRId/GaQ0N2dF6w+nWGs1vv5a0lGN/0ZpC3YqXwwpGdx1Z31CWg== X-Received: by 2002:adf:d20c:: with SMTP id j12mr24691284wrh.407.1612866988883; Tue, 09 Feb 2021 02:36:28 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id 143sm3808262wmb.47.2021.02.09.02.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 02:36:28 -0800 (PST) From: luca.boccassi@gmail.com To: Chengchang Tang Cc: Lijun Ou , dpdk stable Date: Tue, 9 Feb 2021 10:35:18 +0000 Message-Id: <20210209103529.466775-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210209103529.466775-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> <20210209103529.466775-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix VF reset on mailbox failure' has been queued to stable release 20.11.1 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.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/11/21. 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/224a29f58811d1a81540275ed334e86dbe4cd518 Thanks. Luca Boccassi --- >From 224a29f58811d1a81540275ed334e86dbe4cd518 Mon Sep 17 00:00:00 2001 From: Chengchang Tang Date: Wed, 3 Feb 2021 20:23:56 +0800 Subject: [PATCH] net/hns3: fix VF reset on mailbox failure [ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ] Currently, during the VF reset, the VF will send a MBX to inform PF to reset it and the disable command bit will be set whether the MBX is successful. Generally, multiple reset attempts are made after a failure. However, because the command is disabled, all subsequent reset will all fail. This patch disable the command only after the MBX message is successfully. Fixes: 2790c6464725 ("net/hns3: support device reset") Signed-off-by: Chengchang Tang Signed-off-by: Lijun Ou --- drivers/net/hns3/hns3_ethdev_vf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 34603a4a30..22ee2f4000 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -2376,15 +2376,17 @@ static int hns3vf_prepare_reset(struct hns3_adapter *hns) { struct hns3_hw *hw = &hns->hw; - int ret = 0; + int ret; if (hw->reset.level == HNS3_VF_FUNC_RESET) { ret = hns3_send_mbx_msg(hw, HNS3_MBX_RESET, 0, NULL, 0, true, NULL, 0); + if (ret) + return ret; } rte_atomic16_set(&hw->reset.disable_cmd, 1); - return ret; + return 0; } static int -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-09 10:34:58.728868872 +0000 +++ 0020-net-hns3-fix-VF-reset-on-mailbox-failure.patch 2021-02-09 10:34:57.914584081 +0000 @@ -1 +1 @@ -From ff81c6b7d053d19fa5d766de449e9a1a462661f5 Mon Sep 17 00:00:00 2001 +From 224a29f58811d1a81540275ed334e86dbe4cd518 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ff81c6b7d053d19fa5d766de449e9a1a462661f5 ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 4f9da4a56c..a607bd3a91 100644 +index 34603a4a30..22ee2f4000 100644 @@ -28 +29 @@ -@@ -2404,15 +2404,17 @@ static int +@@ -2376,15 +2376,17 @@ static int @@ -41 +42 @@ - __atomic_store_n(&hw->reset.disable_cmd, 1, __ATOMIC_RELAXED); + rte_atomic16_set(&hw->reset.disable_cmd, 1);