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 475F4A0540 for ; Wed, 6 Jul 2022 22:36:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4183F40FAE; Wed, 6 Jul 2022 22:36:08 +0200 (CEST) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id A33374069D for ; Wed, 6 Jul 2022 22:36:06 +0200 (CEST) Received: by mail-wr1-f51.google.com with SMTP id a5so8908342wrx.12 for ; Wed, 06 Jul 2022 13:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=FUbmvld9J7DVv+WE4YUio0NWKtyB0L2YyHoJEICI2/U=; b=YmiLeZZItqcKXTuQilmfbhHyB0ZKccx0DIB4iPYEsIn5iz9Pa4by/PVzmXg1TVwpTj +cD3CRZgfaH12Co8WfNqfoHTWGsNZSjgP8CJKHKGc08KkGOcoNRGuUNp3hswrYFjd+NI oDlrFOBFUjUVS/ADYoHy4B69aeiXQs+ZqdEMYxVr0OWohUhNwzCGGFYxlf8+GBuywWXX CNOqLWYwILvHjnfoSWWthXcDvg56Z3fV+f8JXjQXjOfCrNddTG7M4GyFGk7hbYPzD2dV eHUzb6ixKsMFfuvoG7SK+NNYcmqGDpS+ZcDgxGBDDeO5YyYYcnxOzmBO/nwNv63HA+Oo foJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=FUbmvld9J7DVv+WE4YUio0NWKtyB0L2YyHoJEICI2/U=; b=uwG+d2jh7T5HQSsGaeyj7irKW59FAFYoso5ZaCjMpUh1mKbVRJzQDe+e+kppvfZYMG BRyBuwxxD7X6aqImixHqFG4mIpg0/g1BR3oIQEhjfflAYZoRawtXKk5IoTZ0IXUUEl8C MOTThKg8nyMRlphWt0evsOC6DsC5KZVd8nG77aKXU3GSj3JGUMlfPG3Zcs1o75u3Ij7F KwyonH7L/S+/uUzNmXM/xaUuDSPiEIfUomJTk83b4BxVgzjxb/PsU1dUFDsmDAnnj0C1 SaBAavP2dUvcGu8cZJwOpHXRzdlS1OFavspjO4Ji/7ZCADfmMBr6pLRcgiYZXJz3+Jdl QI4w== X-Gm-Message-State: AJIora8vLaL4Ut7ym5y+yu/0zJOuUnATNfL0PqmZWV9i+IPyn68smG/+ 72721aftbE82zHUqqpuIQ9SOq12toW9QeQ== X-Google-Smtp-Source: AGRyM1vgkGOBR/bn6hL+NbgQqAa1wFHU2gTA2q+HmKXXdW5tg4Gh3Ot4zcOMKcQLrsNM9IPIsvHsTg== X-Received: by 2002:adf:f946:0:b0:21d:6433:a7bb with SMTP id q6-20020adff946000000b0021d6433a7bbmr22193552wrr.518.1657139766382; Wed, 06 Jul 2022 13:36:06 -0700 (PDT) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id h14-20020a5d548e000000b0021d7ad6b9fdsm3266948wrv.57.2022.07.06.13.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 13:36:05 -0700 (PDT) From: luca.boccassi@gmail.com To: Yiding Zhou Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix VF reset' has been queued to stable release 21.11.2 Date: Wed, 6 Jul 2022 21:34:54 +0100 Message-Id: <20220706203506.3422496-19-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220706203506.3422496-1-luca.boccassi@gmail.com> References: <20220628151938.2278711-26-ktraynor@redhat.com> <20220706203506.3422496-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 21.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/08/22. 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/97e75c37b04de4cfb2fd7f73de1481ba7e062ae0 Thanks. Luca Boccassi --- >From 97e75c37b04de4cfb2fd7f73de1481ba7e062ae0 Mon Sep 17 00:00:00 2001 From: Yiding Zhou Date: Mon, 27 Jun 2022 15:22:32 +0800 Subject: [PATCH] net/iavf: fix VF reset [ upstream commit 196f35f81c962a1eae3f63bd621dfd9ebbf9a926 ] When the VF is in closed state, the vf_reset flag can not be reverted if the VF is reset asynchronously. This prevents all virtchnl commands from executing, causing subsequent calls to iavf_dev_reset() to fail. So the vf_reset flag needs to be reverted even when VF is in closed state. Fixes: 676d986b4b86 ("net/iavf: fix crash after VF reset failure") Signed-off-by: Yiding Zhou Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ethdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index c002d605b8..f835457e4f 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2634,8 +2634,10 @@ iavf_dev_close(struct rte_eth_dev *dev) if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; - if (adapter->closed) - return 0; + if (adapter->closed) { + ret = 0; + goto out; + } ret = iavf_dev_stop(dev); adapter->closed = true; @@ -2695,6 +2697,7 @@ iavf_dev_close(struct rte_eth_dev *dev) * the bus master bit will not be disabled, and this call will have no * effect. */ +out: if (vf->vf_reset && !rte_pci_set_bus_master(pci_dev, true)) vf->vf_reset = false; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-06 21:07:54.212053889 +0100 +++ 0019-net-iavf-fix-VF-reset.patch 2022-07-06 21:07:53.551518861 +0100 @@ -1 +1 @@ -From 196f35f81c962a1eae3f63bd621dfd9ebbf9a926 Mon Sep 17 00:00:00 2001 +From 97e75c37b04de4cfb2fd7f73de1481ba7e062ae0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 196f35f81c962a1eae3f63bd621dfd9ebbf9a926 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 7df0bf8118..506fcff6e3 100644 +index c002d605b8..f835457e4f 100644 @@ -25 +26 @@ -@@ -2702,8 +2702,10 @@ iavf_dev_close(struct rte_eth_dev *dev) +@@ -2634,8 +2634,10 @@ iavf_dev_close(struct rte_eth_dev *dev) @@ -38 +39 @@ -@@ -2763,6 +2765,7 @@ iavf_dev_close(struct rte_eth_dev *dev) +@@ -2695,6 +2697,7 @@ iavf_dev_close(struct rte_eth_dev *dev)