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 D7D1548A44 for ; Fri, 31 Oct 2025 15:38:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF9064067E; Fri, 31 Oct 2025 15:38:58 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 6BCF040150 for ; Fri, 31 Oct 2025 15:38:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1761921537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EhzntBofBfmIgymJYZgLFyZbZyLtS1tnl4hOL87bWjk=; b=B3Utj7mvtKynpUIXnMn60C1zKOnN9tv1qXREkinnqjrbVDMT9Lw1uBDhE3nb7gdD2DqNLT f+FsH77KazFMdTKC2qvOOhNP4Ib3qBlRZDuAjeSUQdVyxG4da9ZtTswVWWkxaqE4+fYJRe MgGhgkyXdRRcB/DpK8NasMUISA9IA1o= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-584-cixs8NLFP8mC-FMZK7rmwQ-1; Fri, 31 Oct 2025 10:38:53 -0400 X-MC-Unique: cixs8NLFP8mC-FMZK7rmwQ-1 X-Mimecast-MFC-AGG-ID: cixs8NLFP8mC-FMZK7rmwQ_1761921532 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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 mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9DE3F18009C0; Fri, 31 Oct 2025 14:38:52 +0000 (UTC) Received: from rh.redhat.com (unknown [10.44.32.50]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E8B4180044F; Fri, 31 Oct 2025 14:38:50 +0000 (UTC) From: Kevin Traynor To: Dengdui Huang Cc: dpdk stable Subject: patch 'net/hns3: fix VLAN resources freeing' has been queued to stable release 24.11.4 Date: Fri, 31 Oct 2025 14:33:35 +0000 Message-ID: <20251031143421.324432-93-ktraynor@redhat.com> In-Reply-To: <20251031143421.324432-1-ktraynor@redhat.com> References: <20251031143421.324432-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: DSoVYOjxINU-j_tREyhZ9s0r1fRqsyTrqXag4z1NQQs_1761921532 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true 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 24.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/05/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/bf519edbd90f036dd720444b2c1539abbfaa7524 Thanks. Kevin --- >From bf519edbd90f036dd720444b2c1539abbfaa7524 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 50c6ed0744..0c9a83eca4 100644 --- a/drivers/net/hns3/hns3_ethdev.c +++ b/drivers/net/hns3/hns3_ethdev.c @@ -4433,5 +4433,5 @@ hns3_init_hardware(struct hns3_adapter *hns) if (ret) { PMD_INIT_LOG(ERR, "Failed to init dcb: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } @@ -4439,5 +4439,5 @@ hns3_init_hardware(struct hns3_adapter *hns) if (ret) { PMD_INIT_LOG(ERR, "Failed to init flow director: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } @@ -4445,5 +4445,5 @@ hns3_init_hardware(struct hns3_adapter *hns) if (ret) { PMD_INIT_LOG(ERR, "Failed to config tso: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } @@ -4451,5 +4451,5 @@ hns3_init_hardware(struct hns3_adapter *hns) if (ret) { PMD_INIT_LOG(ERR, "Failed to config gro: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } @@ -4463,5 +4463,5 @@ hns3_init_hardware(struct hns3_adapter *hns) if (ret) { PMD_INIT_LOG(ERR, "Failed to init ring intr vector: %d", ret); - goto err_mac_init; + goto rm_vlan_table; } @@ -4469,9 +4469,10 @@ hns3_init_hardware(struct hns3_adapter *hns) 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); @@ -4479,4 +4480,14 @@ err_mac_init: } +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) @@ -4690,6 +4701,5 @@ 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); @@ -4726,6 +4736,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) 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); -- 2.51.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-10-31 13:53:55.081230233 +0000 +++ 0093-net-hns3-fix-VLAN-resources-freeing.patch 2025-10-31 13:53:52.269524095 +0000 @@ -1 +1 @@ -From 4816b1005bd650b4a1e10af913c497bec860bec5 Mon Sep 17 00:00:00 2001 +From bf519edbd90f036dd720444b2c1539abbfaa7524 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 50c6ed0744..0c9a83eca4 100644 @@ -24 +25 @@ -@@ -4367,5 +4367,5 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4433,5 +4433,5 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -31 +32 @@ -@@ -4373,5 +4373,5 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4439,5 +4439,5 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -38 +39 @@ -@@ -4379,5 +4379,5 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4445,5 +4445,5 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -45 +46 @@ -@@ -4385,5 +4385,5 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4451,5 +4451,5 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -52 +53 @@ -@@ -4397,5 +4397,5 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4463,5 +4463,5 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -59 +60 @@ -@@ -4403,9 +4403,10 @@ hns3_init_hardware(struct hns3_adapter *hns) +@@ -4469,9 +4469,10 @@ hns3_init_hardware(struct hns3_adapter *hns) @@ -72 +73 @@ -@@ -4413,4 +4414,14 @@ err_mac_init: +@@ -4479,4 +4480,14 @@ err_mac_init: @@ -87 +88 @@ -@@ -4624,6 +4635,5 @@ err_enable_intr: +@@ -4690,6 +4701,5 @@ err_enable_intr: @@ -95 +96 @@ -@@ -4660,6 +4670,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev) +@@ -4726,6 +4736,5 @@ hns3_uninit_pf(struct rte_eth_dev *eth_dev)