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 A4575489EF for ; Mon, 27 Oct 2025 17:22:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F45B4069D; Mon, 27 Oct 2025 17:22:59 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 4D1E14068A for ; Mon, 27 Oct 2025 17:22:58 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-471b80b994bso68674215e9.3 for ; Mon, 27 Oct 2025 09:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761582178; x=1762186978; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=uAMuVqU8o8F00l4oOv8uzz1f4eUbx+oOfr0HQwMYFyU=; b=ZxqgrmtO1Pv5vZdu5APhmLGryJ5syZxZyqybtLgcGYh70lvLowNFmAIkHXZv+zROvi swudVCN0ltY2OUuIouByXm3yEUYA+7pVmrf2F+ResK/WBxe1xDM8uvfVT3Vf3cWkLW4R 1qQLs6CErUMfBNdgfdSAeEn+uBHahiEUKFBXj7jt4OGdjpo8u6yBGBNPI6snNfBJ5BEd nkcw7yb5mFRloYCkTmM7jQmrmZaKIRoGrBc8TQtUks66qKsIpRgiAzChR/WtU+yjxzZ0 pE3NYT+a9Sk5/gLoEu8stYpcVto1Ntsn95R7h0hvf4hovubnMktBydeDcCAANRbMdjx1 OtbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761582178; x=1762186978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-g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kHCrON3zkRHOrUJII1H5WHFmzqXi/SoH3Lz3xgfiNgEhUHyY5VyH3PJg== X-Received: by 2002:a05:6000:4381:b0:427:a34:648f with SMTP id ffacd0b85a97d-429a7e7adbdmr260868f8f.49.1761582177767; Mon, 27 Oct 2025 09:22:57 -0700 (PDT) Received: from localhost ([2a01:4b00:d036:ae00:6fc5:c3bc:147e:832c]) by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-429952db99asm15226274f8f.32.2025.10.27.09.22.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Oct 2025 09:22:57 -0700 (PDT) From: luca.boccassi@gmail.com To: Dengdui Huang Cc: dpdk stable Subject: patch 'net/hns3: fix VLAN resources freeing' has been queued to stable release 22.11.11 Date: Mon, 27 Oct 2025 16:19:32 +0000 Message-ID: <20251027162001.3710450-54-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027162001.3710450-1-luca.boccassi@gmail.com> References: <20251027162001.3710450-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 22.11.11 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/29/25. 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/9b39971fc6e0e622220df2516a85e25204eb35e3 Thanks. Luca Boccassi --- >From 9b39971fc6e0e622220df2516a85e25204eb35e3 Mon Sep 17 00:00:00 2001 From: Dengdui Huang Date: Fri, 22 Aug 2025 14:04:28 +0800 Subject: [PATCH] net/hns3: fix VLAN resources freeing [ upstream commit 4816b1005bd650b4a1e10af913c497bec860bec5 ] In the initialization process, it is necessary to release VLAN resources on the failure branch. Additionally, encapsulate a function hns3_uninit_hardware() to release the resources allocated by the hns3_init_hardware() function. Fixes: 411d23b9eafb ("net/hns3: support VLAN") Signed-off-by: Dengdui Huang --- drivers/net/hns3/hns3_ethdev.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/net/hns3/hns3_ethdev.c b/drivers/net/hns3/hns3_ethdev.c index c31b052b6f..a220131294 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4422,25 +4422,25 @@ hns3_init_hardware(struct hns3_adapter *hns) ret = hns3_dcb_init(hw); if (ret) { PMD_INIT_LOG(ERR, "Failed to init dcb: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } ret = hns3_init_fd_config(hns); if (ret) { PMD_INIT_LOG(ERR, "Failed to init flow director: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } ret = hns3_config_tso(hw, HNS3_TSO_MSS_MIN, HNS3_TSO_MSS_MAX); if (ret) { PMD_INIT_LOG(ERR, "Failed to config tso: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } ret = hns3_config_gro(hw, false); if (ret) { PMD_INIT_LOG(ERR, "Failed to config gro: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } /* @@ -4452,22 +4452,33 @@ hns3_init_hardware(struct hns3_adapter *hns) ret = hns3_init_ring_with_vector(hw); if (ret) { PMD_INIT_LOG(ERR, "Failed to init ring intr vector: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } ret = hns3_ptp_init(hw); if (ret) { PMD_INIT_LOG(ERR, "Failed to init PTP, ret = %d", ret); - goto err_mac_init; + goto rm_vlan_table; } return 0; - +rm_vlan_table: + hns3_rm_all_vlan_table(hns, true); err_mac_init: hns3_uninit_umv_space(hw); return ret; } +static void +hns3_uninit_hardware(struct hns3_hw *hw) +{ + struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); + + (void)hns3_uninit_umv_space(hw); + hns3_ptp_uninit(hw); + hns3_rm_all_vlan_table(hns, true); +} + static int hns3_clear_hw(struct hns3_hw *hw) { @@ -4699,8 +4710,7 @@ err_supported_speed: err_enable_intr: hns3_fdir_filter_uninit(hns); err_fdir: - hns3_uninit_umv_space(hw); - hns3_ptp_uninit(hw); + hns3_uninit_hardware(hw); err_init_hw: hns3_stats_uninit(hw); err_get_config: @@ -4735,8 +4745,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) hns3_promisc_uninit(hw); hns3_flow_uninit(eth_dev); hns3_fdir_filter_uninit(hns); - hns3_uninit_umv_space(hw); - hns3_ptp_uninit(hw); + hns3_uninit_hardware(hw); hns3_stats_uninit(hw); hns3_config_mac_tnl_int(hw, false); hns3_pf_disable_irq0(hw); -- 2.47.3 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-27 15:54:36.790836287 +0000 +++ 0054-net-hns3-fix-VLAN-resources-freeing.patch 2025-10-27 15:54:34.831950453 +0000 @@ -1 +1 @@ -From 4816b1005bd650b4a1e10af913c497bec860bec5 Mon Sep 17 00:00:00 2001 +From 9b39971fc6e0e622220df2516a85e25204eb35e3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 4816b1005bd650b4a1e10af913c497bec860bec5 ] + @@ -13 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index a809a47423..b2eab7e1c5 100644 +index c31b052b6f..a220131294 100644 @@ -24 +25 @@ -@@ -4366,25 +4366,25 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4422,25 +4422,25 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -54 +55 @@ -@@ -4396,22 +4396,33 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4452,22 +4452,33 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -91 +92 @@ -@@ -4623,8 +4634,7 @@ err_supported_speed: +@@ -4699,8 +4710,7 @@ err_supported_speed: @@ -101 +102 @@ -@@ -4659,8 +4669,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) +@@ -4735,8 +4745,7 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)