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 56F9DA0540 for ; Thu, 7 Jul 2022 09:57:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 522C441147; Thu, 7 Jul 2022 09:57:51 +0200 (CEST) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id D7A97406B4 for ; Thu, 7 Jul 2022 09:57:49 +0200 (CEST) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id AF57D40A8D for ; Thu, 7 Jul 2022 07:57:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1657180669; bh=PUBmXTBYfW6pbJp4vvb1x9B+Zykz9SqEjfHD1MdYJbE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IXbNkcO6s77XY85sjGbvJIMDjmLrUlLOT8sED7Bh8VpRYdws4M+yXY7PeNmLDF03e onVG3J65DZqYkGP8CWi/3vIpDVY1L5s2PQ9jwvqYdWWjn+R9ULYsbTuqrzAvVRNnRc yMCr/4lDGHajE39n8KWX6EU3csmoyBH/3M04tSAzXdI3+rGTv8Jof7iL/22K436mxH AYTPEZSiVVNHRTzpHWX1m6AZ00bTmaUDWKLCRyGTI5U+h9QEg24WNPrINR+tJz6DFG 2bYuJk1EivACiRgtyUlsjrk2QXPz62PHG/6qgY58Tlh6r5njiNK+O5Y5Yo5wg7mcGz oWLVb794qIWvA== Received: by mail-ed1-f70.google.com with SMTP id z17-20020a05640235d100b0043762b1e1e3so13468210edc.21 for ; Thu, 07 Jul 2022 00:57:49 -0700 (PDT) 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=PUBmXTBYfW6pbJp4vvb1x9B+Zykz9SqEjfHD1MdYJbE=; b=L5zV226gFgFCdt4TR9+GLaVoj/28+AScAJnsXB8y24CpMPyuehR+yK2nO0NXicZ++m Z7u2Ngge/wVTY+7tUpdSvCwSG5efLy9Jr9J7MfZh58mhUYFDii/KWEATch4ue5tMAKbv FTjwODdaBaQ+lMNwdtKxg5LVmv8Y06QjKg48o4f4ZA25I1Tj3GZrEFvj1UVySLth0wkv 8he+kxkpm3Wdlq4IyxjjbRi1m1qKIWD/zgi6ouYD1Wx2th/v5gKq1/ixrm3L8xfCzyZN EV9xMWkD5x7TGOXB2iAdTli+/s/Rc4vOV45kG/t0D5C1AePOsdTRSFiHrsLcJE0UyO6K 6coA== X-Gm-Message-State: AJIora9tT9tZnfuhD1bJRvQTo02Fi1O6DleAXNYCmgSXsZmpjj+qThgB LvNkcgJeJDQGSa+EDR4BAtoI/YqN9EoRi0S+dmKB/nTiSqBc5ZY6smA+p1W038ML3zURjNwxnYi 6oqt6W6J9WMgAn64j3ThkAGfW X-Received: by 2002:a17:906:58cf:b0:722:e4e1:c174 with SMTP id e15-20020a17090658cf00b00722e4e1c174mr43831690ejs.85.1657180669372; Thu, 07 Jul 2022 00:57:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vaQdn0Rn7EdDobCi8lQf8tRwPf3iHXujUxJDCcaXO46/wvGGO05c5lbeG6860MAM4fBQ3OWA== X-Received: by 2002:a17:906:58cf:b0:722:e4e1:c174 with SMTP id e15-20020a17090658cf00b00722e4e1c174mr43831669ejs.85.1657180669143; Thu, 07 Jul 2022 00:57:49 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2a02:6d40:3a4f:7b00:c19b:938e:7c97:afe2]) by smtp.gmail.com with ESMTPSA id d1-20020a056402516100b0043a09f6fc24sm11385793ede.47.2022.07.07.00.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jul 2022 00:57:48 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Qiming Yang Cc: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix queue start exception handling' has been queued to stable release 19.11.13 Date: Thu, 7 Jul 2022 09:54:43 +0200 Message-Id: <20220707075522.194223-48-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220707075522.194223-1-christian.ehrhardt@canonical.com> References: <20220707075522.194223-1-christian.ehrhardt@canonical.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 19.11.13 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/09/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/876ff3ffd902e0fc6d32d38367a2272a86ca25c7 Thanks. Christian Ehrhardt --- >From 876ff3ffd902e0fc6d32d38367a2272a86ca25c7 Mon Sep 17 00:00:00 2001 From: Qiming Yang Date: Thu, 19 May 2022 05:01:56 +0000 Subject: [PATCH] net/iavf: fix queue start exception handling [ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ] If any queue start fail during dev_start, all started queues should be stopped. Fixes: 69dd4c3d0898 ("net/avf: enable queue and device") Signed-off-by: Qiming Yang Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ethdev.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index 583a8be760..3cb02bd1fb 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -433,28 +433,38 @@ iavf_start_queues(struct rte_eth_dev *dev) struct iavf_rx_queue *rxq; struct iavf_tx_queue *txq; int i; + uint16_t nb_txq, nb_rxq; - for (i = 0; i < dev->data->nb_tx_queues; i++) { - txq = dev->data->tx_queues[i]; + for (nb_txq = 0; nb_txq < dev->data->nb_tx_queues; nb_txq++) { + txq = dev->data->tx_queues[nb_txq]; if (txq->tx_deferred_start) continue; - if (iavf_dev_tx_queue_start(dev, i) != 0) { - PMD_DRV_LOG(ERR, "Fail to start queue %u", i); - return -1; + if (iavf_dev_tx_queue_start(dev, nb_txq) != 0) { + PMD_DRV_LOG(ERR, "Fail to start tx queue %u", nb_txq); + goto tx_err; } } - for (i = 0; i < dev->data->nb_rx_queues; i++) { - rxq = dev->data->rx_queues[i]; + for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) { + rxq = dev->data->rx_queues[nb_rxq]; if (rxq->rx_deferred_start) continue; - if (iavf_dev_rx_queue_start(dev, i) != 0) { - PMD_DRV_LOG(ERR, "Fail to start queue %u", i); - return -1; + if (iavf_dev_rx_queue_start(dev, nb_rxq) != 0) { + PMD_DRV_LOG(ERR, "Fail to start rx queue %u", nb_rxq); + goto rx_err; } } return 0; + +rx_err: + for (i = 0; i < nb_rxq; i++) + iavf_dev_rx_queue_stop(dev, i); +tx_err: + for (i = 0; i < nb_txq; i++) + iavf_dev_tx_queue_stop(dev, i); + + return -1; } static int -- 2.37.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-07 09:54:13.212614005 +0200 +++ 0048-net-iavf-fix-queue-start-exception-handling.patch 2022-07-07 09:54:10.937824444 +0200 @@ -1 +1 @@ -From 1fa739c3f2b3876d21e506c024a3c6bee6562943 Mon Sep 17 00:00:00 2001 +From 876ff3ffd902e0fc6d32d38367a2272a86ca25c7 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 1fa739c3f2b3876d21e506c024a3c6bee6562943 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 198d8299af..315ab15aad 100644 +index 583a8be760..3cb02bd1fb 100644 @@ -22 +23 @@ -@@ -926,28 +926,38 @@ iavf_start_queues(struct rte_eth_dev *dev) +@@ -433,28 +433,38 @@ iavf_start_queues(struct rte_eth_dev *dev)