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 D298FA0350 for ; Mon, 21 Feb 2022 16:41:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD1C5410F7; Mon, 21 Feb 2022 16:41:10 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 45A2D40E5A for ; Mon, 21 Feb 2022 16:41:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645458068; 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=P7adXIO7q7weM/brq4JDzFhzkDLWmODiCNdDLhpaacA=; b=FG1xPJ2z7cfUvYOPNmqfVVG0UnNR6YR4Zmx7QqFH6iaXa67BjXW/0XHNE8H4ZouZwT75lh /WXRgD58kPbuzZH+SWqbWPZrYfbkkcdiLBeINqq3GvFAzIe3BFNo+HfmJ3q3sfLYQDYh7V s7ro4H44UbX5o7tBdJijw5AyYO2wcQ0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-637-dXIWgPxkNf2uco0_YXozlw-1; Mon, 21 Feb 2022 10:41:03 -0500 X-MC-Unique: dXIWgPxkNf2uco0_YXozlw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74671185302A; Mon, 21 Feb 2022 15:41:02 +0000 (UTC) Received: from rh.Home (unknown [10.39.195.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 656197E133; Mon, 21 Feb 2022 15:41:01 +0000 (UTC) From: Kevin Traynor To: Yunjian Wang Cc: Haiyue Wang , dpdk stable Subject: patch 'net/ixgbe: check filter init failure' has been queued to stable release 21.11.1 Date: Mon, 21 Feb 2022 15:35:24 +0000 Message-Id: <20220221153625.152324-135-ktraynor@redhat.com> In-Reply-To: <20220221153625.152324-1-ktraynor@redhat.com> References: <20220221153625.152324-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/26/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/30dcde846730dd6d000da7b02f7b00a3071bb5ca Thanks. Kevin --- >From 30dcde846730dd6d000da7b02f7b00a3071bb5ca Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Fri, 24 Dec 2021 19:26:38 +0800 Subject: [PATCH] net/ixgbe: check filter init failure [ upstream commit 8c1e5c658c24553d5f813adc8afed8910e6f5194 ] The function ixgbe_fdir_filter_init() and ixgbe_l2_tn_filter_init() could return errors, the return value need to be checked and returned. Fixes: 080e3c0ee989 ("net/ixgbe: store flow director filter") Fixes: d0c0c416ef1f ("net/ixgbe: store L2 tunnel filter") Signed-off-by: Yunjian Wang Acked-by: Haiyue Wang --- drivers/net/ixgbe/ixgbe_ethdev.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index c8f0460440..2f4ebb4e59 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1224,11 +1224,6 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) /* initialize PF if max_vfs not zero */ ret = ixgbe_pf_host_init(eth_dev); - if (ret) { - rte_free(eth_dev->data->mac_addrs); - eth_dev->data->mac_addrs = NULL; - rte_free(eth_dev->data->hash_mac_addrs); - eth_dev->data->hash_mac_addrs = NULL; - return ret; - } + if (ret) + goto err_pf_host_init; ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT); @@ -1269,8 +1264,12 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) /* initialize flow director filter list & hash */ - ixgbe_fdir_filter_init(eth_dev); + ret = ixgbe_fdir_filter_init(eth_dev); + if (ret) + goto err_fdir_filter_init; /* initialize l2 tunnel filter list & hash */ - ixgbe_l2_tn_filter_init(eth_dev); + ret = ixgbe_l2_tn_filter_init(eth_dev); + if (ret) + goto err_l2_tn_filter_init; /* initialize flow filter lists */ @@ -1284,4 +1283,19 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) return 0; + +err_l2_tn_filter_init: + ixgbe_fdir_filter_uninit(eth_dev); +err_fdir_filter_init: + ixgbe_disable_intr(hw); + rte_intr_disable(intr_handle); + rte_intr_callback_unregister(intr_handle, + ixgbe_dev_interrupt_handler, eth_dev); + ixgbe_pf_host_uninit(eth_dev); +err_pf_host_init: + rte_free(eth_dev->data->mac_addrs); + eth_dev->data->mac_addrs = NULL; + rte_free(eth_dev->data->hash_mac_addrs); + eth_dev->data->hash_mac_addrs = NULL; + return ret; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-21 15:22:47.517222824 +0000 +++ 0135-net-ixgbe-check-filter-init-failure.patch 2022-02-21 15:22:44.277704545 +0000 @@ -1 +1 @@ -From 8c1e5c658c24553d5f813adc8afed8910e6f5194 Mon Sep 17 00:00:00 2001 +From 30dcde846730dd6d000da7b02f7b00a3071bb5ca Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8c1e5c658c24553d5f813adc8afed8910e6f5194 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org