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 F2E92A0C4C for ; Mon, 12 Jul 2021 15:13:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECC294069E; Mon, 12 Jul 2021 15:13:24 +0200 (CEST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mails.dpdk.org (Postfix) with ESMTP id E21E24069E for ; Mon, 12 Jul 2021 15:13:23 +0200 (CEST) Received: by mail-wr1-f45.google.com with SMTP id m2so14529621wrq.2 for ; Mon, 12 Jul 2021 06:13:23 -0700 (PDT) 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=XsL65RMJGpKoC3yaBwkHDVPvQLMAYV52D2iJAm75Q9I=; b=NSMMfJcFtB0FYxMw3mqQvGV1sivYNFse6Fe/+7Mqt+C+5Q3hncwxFTT8yJZa8cdtXY JCNyRh/3V/6NidamnW2ZHSJM+01dKcofH2WyPFzJG8LcDVXwZ/GHIfGXNhI/fDAjOw0w 6RfPkfDHjO+WbZZxddZXLSwO0cjIuOIbkHY/BjQKEy1xc4ysO7UEmbmu3iXMvNFDuXEz gPC/w2d/2oMzNsFKSxZCy/UsavO/4C/cQ8+dslqyfXpfWH3eDCK/MMNjBHXXyad+e53R bGrCeVa2AH2MrnEFwLCjpuXTtZf7xugHAThBT6MyU+fXv0d+p96n+1YU+23rSDnKZ91w kKyw== 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=XsL65RMJGpKoC3yaBwkHDVPvQLMAYV52D2iJAm75Q9I=; b=oIl1Q73XAKXUtvLb+pLGw6k0mi/imD6xFyHg8I1aRm7n3+UXbrIaM7S83++i1N0QzH 0XYcPfF7gPF1lpjOIKrYkxz/7cEBywysRNirsy2lD003aT4bmd4g7D2KkEe0QNpwWDkI Ex8cL6NRASIt15jrRXjtSQzmXfZX/KM/HHBBJW8RBmpR7GoA9Q6LaYpUx6PzbspnQQiu vwiM9bJATbwZf8mvp+t1o7lFf857S9URD8h3R/8WvXXk7VO0LFX+9sqh6aG9FhI2cCjy dB0XvTobKhQsq3o2vDab0J0OK+vy4On8cxqjgcJ3ikwQ4IVGrMQO5GJJ0gQZ4VCVbAGF RIDw== X-Gm-Message-State: AOAM532iVnbn9+CWxuyzqke2J178hqq/5eyhoAU8Y27MpoAG3e7LHoVn XggE8c+PkdzTZ6yCKIkkmm8= X-Google-Smtp-Source: ABdhPJz2IffOwRi8tblSgptbXnWWEH22mXCkA4QWswZwCvcTk6yLzIhdeE5Tv31wAv41dpMKx/vShw== X-Received: by 2002:adf:dc82:: with SMTP id r2mr34561009wrj.33.1626095603653; Mon, 12 Jul 2021 06:13:23 -0700 (PDT) Received: from localhost ([137.220.125.106]) by smtp.gmail.com with ESMTPSA id d14sm3708155wrs.49.2021.07.12.06.13.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 06:13:23 -0700 (PDT) From: luca.boccassi@gmail.com To: Huisong Li Cc: Min Hu , dpdk stable Date: Mon, 12 Jul 2021 14:04:57 +0100 Message-Id: <20210712130551.2462159-62-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712130551.2462159-1-luca.boccassi@gmail.com> References: <20210712130551.2462159-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/hns3: fix fake queue rollback' has been queued to stable release 20.11.3 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.3 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/14/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/219472cbad519c64d8fa8124b09c4a5fc3c0bc6b Thanks. Luca Boccassi --- >From 219472cbad519c64d8fa8124b09c4a5fc3c0bc6b Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Sun, 13 Jun 2021 10:31:53 +0800 Subject: [PATCH] net/hns3: fix fake queue rollback [ upstream commit a2ddaac12b08a98eee4b4e082d72c2f68dc92bf0 ] When the device supports independent Rx/Tx queues, fake queues do not need to be created in unequal Rx/Tx queues case. However, dev_configure fails to be executed on the device supported independent Rx/Tx queues, the current rollback code logic contains the fake queue. As a result, the fake queue is created. When dev_configure is successfully called again, these fake queues still exists and are configured to the hardware. Fixes: fa29fe45a7b4 ("net/hns3: support queue start and stop") Signed-off-by: Huisong Li Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_ethdev.c | 11 ++++------- drivers/net/hns3/hns3_ethdev_vf.c | 11 ++++------- drivers/net/hns3/hns3_rxtx.c | 3 +++ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index 249ab31040..5f897fed39 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -2376,13 +2376,10 @@ hns3_dev_configure(struct rte_eth_dev *dev) * work as usual. But these fake queues are imperceptible, and can not * be used by upper applications. */ - if (!hns3_dev_indep_txrx_supported(hw)) { - ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q); - if (ret) { - hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", - ret); - return ret; - } + ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q); + if (ret) { + hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", ret); + return ret; } hw->adapter_state = HNS3_NIC_CONFIGURING; diff --git a/drivers/net/hns3/hns3_ethdev_vf.c b/drivers/net/hns3/hns3_ethdev_vf.c index 5a9550d853..2959d81a71 100644 --- a/drivers/net/hns3/hns3_ethdev_vf.c +++ b/drivers/net/hns3/hns3_ethdev_vf.c @@ -799,13 +799,10 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) * work as usual. But these fake queues are imperceptible, and can not * be used by upper applications. */ - if (!hns3_dev_indep_txrx_supported(hw)) { - ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q); - if (ret) { - hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", - ret); - return ret; - } + ret = hns3_set_fake_rx_or_tx_queues(dev, nb_rx_q, nb_tx_q); + if (ret) { + hns3_err(hw, "fail to set Rx/Tx fake queues, ret = %d.", ret); + return ret; } hw->adapter_state = HNS3_NIC_CONFIGURING; diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index abf9908aeb..c77c828011 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -1616,6 +1616,9 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q, uint16_t q; int ret; + if (hns3_dev_indep_txrx_supported(hw)) + return 0; + /* Setup new number of fake RX/TX queues and reconfigure device. */ rx_need_add_nb_q = hw->cfg_max_queues - nb_rx_q; tx_need_add_nb_q = hw->cfg_max_queues - nb_tx_q; -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-07-12 13:41:39.892693620 +0100 +++ 0062-net-hns3-fix-fake-queue-rollback.patch 2021-07-12 13:41:36.526123360 +0100 @@ -1 +1 @@ -From a2ddaac12b08a98eee4b4e082d72c2f68dc92bf0 Mon Sep 17 00:00:00 2001 +From 219472cbad519c64d8fa8124b09c4a5fc3c0bc6b Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a2ddaac12b08a98eee4b4e082d72c2f68dc92bf0 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index dff265828e..ad25aa69d7 100644 +index 249ab31040..5f897fed39 100644 @@ -28 +29 @@ -@@ -2497,13 +2497,10 @@ hns3_dev_configure(struct rte_eth_dev *dev) +@@ -2376,13 +2376,10 @@ hns3_dev_configure(struct rte_eth_dev *dev) @@ -47 +48 @@ -index 7a5c162964..74f93dcb15 100644 +index 5a9550d853..2959d81a71 100644 @@ -50 +51 @@ -@@ -801,13 +801,10 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) +@@ -799,13 +799,10 @@ hns3vf_dev_configure(struct rte_eth_dev *dev) @@ -69 +70 @@ -index 1d7a769768..d6aef756b3 100644 +index abf9908aeb..c77c828011 100644 @@ -72 +73 @@ -@@ -1617,6 +1617,9 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q, +@@ -1616,6 +1616,9 @@ hns3_set_fake_rx_or_tx_queues(struct rte_eth_dev *dev, uint16_t nb_rx_q,