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 92AA5A0032 for ; Fri, 18 Feb 2022 13:44:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8EBDF40395; Fri, 18 Feb 2022 13:44:08 +0100 (CET) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mails.dpdk.org (Postfix) with ESMTP id 6F02340395 for ; Fri, 18 Feb 2022 13:44:06 +0100 (CET) Received: by mail-wr1-f50.google.com with SMTP id x5so9539551wrg.13 for ; Fri, 18 Feb 2022 04:44:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Eh08ksJdr+4AQU6y/PqZZJA7f7uMXjgZZIaNIeCfwmU=; b=KR1giiBXFaxic7LXqmNCm6XMhPS3NAr6+0uq0WBTWc+NcHwZiILEgFUdv0TytGM9cq 5h4T1EsRYLlzektBI6tmbov78jRJ+hr0eaMaaG/KSAzIphjfZzBJtKn7JNIUrXFBhjNC +aFJ2Z5oZFGzDZ/Mw1FjNT4/Fq/Ysdi81Z++iWzFkVYgszzqTdlWcxxDU8UEDDsumEIw ctT5nIjOUTEt8ivA1qD3m8ZWS7sDGB5QYS32z7+087zRsDKp3RP5a6MgHbCtZnoTMLHB OCSclfc1f3S/o8C/vQZzmOqJ9w5OBSc6O7IfEKNTlFbSqFPIOkCmEozIURBa4FEcvq0k lfTA== 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=Eh08ksJdr+4AQU6y/PqZZJA7f7uMXjgZZIaNIeCfwmU=; b=usuC7KTV2Qt0Igh0muJu/gWiRXlbfaOPfxt0B5HN/mBgY/w3f0SofiOdpYoniaCIJX sYYlvHttKFHnbI5UAfP+MsEB9nK6ZTIvLTJOB652b63buElRnbtuOl5sMmqPc7PN0gJr hOD3xoxcCGwLNI3lNksLKQgO5g6rBvyUa87ARcjcf2q41nqOvvBXuVNim3hVPfRCTquc KQVozdy/PBWpT7Gpq42r8H8M49gg56CnU53Gcj56X87lpJqLI9D14fKeIYm5gpjG/MpV J4GiOjAXjMEceIcxkicFDGFfm3liWNmwB1wpUdsTDDQx3MdsPKqTseaHqZVTaCNLUL+r PXOg== X-Gm-Message-State: AOAM533VkdykqjmFsYXW96W+cHj3pLelmNM1rPapFatQvgebNtQLeGaw /i4SbzBuNKfk+7DCjU/NF5w= X-Google-Smtp-Source: ABdhPJzXDk/oi9lFTAOXfm2VqYDAYtA/CB0xPbYuk3qAUe0BtuXUxRSNGkOyoqHfGkfM/TIBfGnR/Q== X-Received: by 2002:adf:c409:0:b0:1e7:be44:8dfa with SMTP id v9-20020adfc409000000b001e7be448dfamr6191159wrf.617.1645188246135; Fri, 18 Feb 2022 04:44:06 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id 1sm3986566wmk.16.2022.02.18.04.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:44:05 -0800 (PST) From: luca.boccassi@gmail.com To: Yunjian Wang Cc: Haiyue Wang , dpdk stable Subject: patch 'net/ixgbe: check filter init failure' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:57 +0000 Message-Id: <20220218123931.1749595-88-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-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 20.11.5 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/20/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/8189e99b3a5f743b1b7ecd3cb1553d6e49a26a78 Thanks. Luca Boccassi --- >From 8189e99b3a5f743b1b7ecd3cb1553d6e49a26a78 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 e125eff54b..0853ae05d6 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1231,13 +1231,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 */ @@ -1276,10 +1271,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(); @@ -1291,6 +1290,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.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:41.257946107 +0000 +++ 0088-net-ixgbe-check-filter-init-failure.patch 2022-02-18 12:37:37.790794153 +0000 @@ -1 +1 @@ -From 8c1e5c658c24553d5f813adc8afed8910e6f5194 Mon Sep 17 00:00:00 2001 +From 8189e99b3a5f743b1b7ecd3cb1553d6e49a26a78 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 e125eff54b..0853ae05d6 100644 @@ -23 +24 @@ -@@ -1223,13 +1223,8 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused) +@@ -1231,13 +1231,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) +@@ -1276,10 +1271,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) +@@ -1291,6 +1290,21 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)