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 247EFA034C for ; Fri, 25 Feb 2022 18:17:46 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B34A41157; Fri, 25 Feb 2022 18:17:46 +0100 (CET) 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 AC6374113D for ; Fri, 25 Feb 2022 18:17:44 +0100 (CET) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.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 F08B93F1BC for ; Fri, 25 Feb 2022 17:17:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1645809463; bh=LOmk3qRboBpzFJGZZHishGWT85bIaGXmF5MiIRGNPmo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JqkIhwLlVV8ojYqZi+2u2jQi8SV48Y0us5FJXEETWGlu0WWfkcuVdsNT0zGdqXRHL KkT/Ji4O4Kla/VuGF/emWgmg/ogymmQNdE4zoU1MNXmxC7GuQPO2gwQ0qhjpMuRf3L DWkB6EpVSzUWcSWbVsZpIeff5sduu8avz1XZuOD9BUw+zsI6TQsqJaHDgXA5Xg0SjZ FvrLvWIbyT1uhAVWClV7MgX68wOFYEBYxa35Zvh/0Z8FvTyQ6RLN8/QCXfx1Ok6FrW TlkrEMQZSd9MoWitlhQiDG0086sFCHV7LSIRzchcWfoeaMwLAYlj+S0KWPZanyWRwC n5QSe0H8FdW+A== Received: by mail-wm1-f70.google.com with SMTP id l31-20020a05600c1d1f00b00380e3425ba7so1591152wms.9 for ; Fri, 25 Feb 2022 09:17:43 -0800 (PST) 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=LOmk3qRboBpzFJGZZHishGWT85bIaGXmF5MiIRGNPmo=; b=Lr4JmzNdlc/OHWfhUl740garUin2oGa9mDEOU6egPmzdLo+XY1Kdl70kmpJTsenwAV Si/ZbY1Kl9HW9xt3XD5GQnr8g+4/+hrbLIWNWC70rDoIDhA2XWPVkKeVspYWen16VOQ7 wT5iUzncHpilTOX90Eu6GG7GFvTMLg8ekiXSR70Ed8dUv//qfIy3wEcuyMm+oIWCkDpM eQlB3x4IhvkB7DHjOD3KW5EFoX0kNtgWTq4VuciWJPH/tl8QYAKsmyt95Egclz4IlX0Y A1RZ8ekNYLq0HWHuVzy3+outPne7CYfFKvQ23Yn99bmUa77VE0cZhI/nOBP+6PQGg/QW 2ZbQ== X-Gm-Message-State: AOAM5312aD+K2i2nAeeJivOv7XElb0X4g5uwEo5IpvmYGrgsGihoTi3Z oXwNOPcGRfJwSIROgWo4ys5U3ENigIA0P3tGYrAKjPgtpoWuXsfDpGRbORI2UaY1e3KzxrMYtTN fd5CN9IhZS++/dQa9BHAM73sH X-Received: by 2002:a05:600c:34c4:b0:37b:f84d:d55a with SMTP id d4-20020a05600c34c400b0037bf84dd55amr3460301wmq.123.1645809463402; Fri, 25 Feb 2022 09:17:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJyWq4XbcEQ4X8FgVzhv6klVlmgT1hgYU6d85sZtYQlIPMYjg4oBUmdE8I2cLHQktKrIDt1e+w== X-Received: by 2002:a05:600c:34c4:b0:37b:f84d:d55a with SMTP id d4-20020a05600c34c400b0037bf84dd55amr3460288wmq.123.1645809463171; Fri, 25 Feb 2022 09:17:43 -0800 (PST) Received: from Keschdeichel.fritz.box (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id a3-20020adfe5c3000000b001e68a5e1c20sm2830030wrn.4.2022.02.25.09.17.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 09:17:42 -0800 (PST) From: christian.ehrhardt@canonical.com To: Yunjian Wang Cc: Haiyue Wang , dpdk stable Subject: patch 'net/ixgbe: check filter init failure' has been queued to stable release 19.11.12 Date: Fri, 25 Feb 2022 18:15:33 +0100 Message-Id: <20220225171550.3499040-40-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220225171550.3499040-1-christian.ehrhardt@canonical.com> References: <20220225171550.3499040-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.12 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/27/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/9ec546fff4c726b3a62b1383481b77ba701b1f74 Thanks. Christian Ehrhardt --- >From 9ec546fff4c726b3a62b1383481b77ba701b1f74 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 a9607e7914..bd2a684941 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1277,13 +1277,8 @@ 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); /* let hardware know driver is loaded */ @@ -1322,10 +1317,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) TAILQ_INIT(&filter_info->fivetuple_list); /* 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 */ ixgbe_filterlist_init(); @@ -1337,6 +1336,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) ixgbe_tm_conf_init(eth_dev); 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; } static int -- 2.35.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-25 16:58:45.772592958 +0100 +++ 0040-net-ixgbe-check-filter-init-failure.patch 2022-02-25 16:58:44.264990435 +0100 @@ -1 +1 @@ -From 8c1e5c658c24553d5f813adc8afed8910e6f5194 Mon Sep 17 00:00:00 2001 +From 9ec546fff4c726b3a62b1383481b77ba701b1f74 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 8c1e5c658c24553d5f813adc8afed8910e6f5194 ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index c8f0460440..2f4ebb4e59 100644 +index a9607e7914..bd2a684941 100644 @@ -23 +24 @@ -@@ -1223,13 +1223,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) +@@ -1277,13 +1277,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) @@ -39 +40 @@ -@@ -1268,10 +1263,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) +@@ -1322,10 +1317,14 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) @@ -56 +57 @@ -@@ -1283,6 +1282,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) +@@ -1337,6 +1336,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)