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 D7E8741D4F for ; Thu, 23 Feb 2023 10:37:40 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D396E4318C; Thu, 23 Feb 2023 10:37:40 +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 3FD4643150 for ; Thu, 23 Feb 2023 10:37:40 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id ay29-20020a05600c1e1d00b003e9f4c2b623so2916246wmb.3 for ; Thu, 23 Feb 2023 01:37:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=eaeKr/uUIP8ZvQnyBM7zAnLzZuWK2nrA21RMkugazlU=; b=RQxiDDecdCRxfc7NCz51KmYumMahaTZBU6hLWFVK79HhFYXDVXQUbDCELSOThYo6OS WtAoAEMMPEqQlvHFtJD86nPeammCQKXp6FlKorZhRJY2EdJXWQFEkgsz+U8RVnxewuyg dAN3wvCaojr4wt9Lrmi9qiUGbgIhTEKkj8CSxrKwc5uLZ7bWIpIAS6LtwwvzxyRqwcLQ VDhgz2BU61G/+Oefh6eg8+fuoSUeiJFV4rgVWwhWvP0kQMzMd/TzqJpfXiptPuxw2ABT x3SRbsIF6FA91L2ve9GBkX1EPdDaZTX4WqUqKv9PMUtQjuM8IL8Vm7WT7p0mCaeHyQZl ZbVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eaeKr/uUIP8ZvQnyBM7zAnLzZuWK2nrA21RMkugazlU=; b=UjotO7loCV9fRHELFKIRbAS7LnmMIlTrXFK7V/VkadiJ+9dU6u/nyV5RXKqm/HvhKn KPMSXHA1BVwntqCh0czlqe5zLWbJGi6Zpg+FTGkU4rDaPJp55nU9WXJdNaDNIUvV9qDT YLyoxYmlD9SxOfsBJzbvQyIFyn4oXv+XuQR7JoCQUmjuJvhuMjHb320IMRz5hQ3rhO41 3sW/INB5Vvw8yp90BItZIKNOdHf1twQYXCnE1No6k2VV30ShpcBAvahfsFuFp+7TYEwc HKVyeAdpJNzSDFMTZJB5cfHEai6H78EGWawPeoLb1oKvwY3g8O14d5DMccBVgKDYZipL XD/A== X-Gm-Message-State: AO0yUKWbbZyW1cT80+0aUCi76j0sqB0WqcMw5oXyTTLxITw66j6GFTCY 0BC4eXIs1mXMUJFkp82Potz32lQvCWA= X-Google-Smtp-Source: AK7set961uN1ZNyFxpVtavtwbY/d8WjbvlKl6kprW2YVgeJtIdsDojhie2MuiUhoaywxs+WBsne/og== X-Received: by 2002:a05:600c:35cf:b0:3dc:53da:328b with SMTP id r15-20020a05600c35cf00b003dc53da328bmr9231714wmq.14.1677145060025; Thu, 23 Feb 2023 01:37:40 -0800 (PST) Received: from localhost ([2a01:4b00:d307:1000:f1d3:eb5e:11f4:a7d9]) by smtp.gmail.com with ESMTPSA id y24-20020a1c4b18000000b003e22508a343sm11126258wma.12.2023.02.23.01.37.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 01:37:39 -0800 (PST) From: luca.boccassi@gmail.com To: Naga Harish K S V Cc: dpdk stable Subject: patch 'eventdev/eth_tx: fix devices loop' has been queued to stable release 20.11.8 Date: Thu, 23 Feb 2023 09:36:10 +0000 Message-Id: <20230223093715.3926893-6-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230223093715.3926893-1-luca.boccassi@gmail.com> References: <20230223093715.3926893-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.8 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/25/23. 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/70b0def9c8018d12a6c8e2cdbf71db69bde1c0eb Thanks. Luca Boccassi --- >From 70b0def9c8018d12a6c8e2cdbf71db69bde1c0eb Mon Sep 17 00:00:00 2001 From: Naga Harish K S V Date: Sat, 7 Jan 2023 10:40:58 -0600 Subject: [PATCH] eventdev/eth_tx: fix devices loop [ upstream commit a870c7e863a5996eb842befa30c6a7d3f9729fcf ] Adapter service function is using RTE_ETH_FOREACH_DEV() macro for looping through all available eth devices and flushing any pending buffered packets. When Traffic Management nodes (vports) are added and deleted dynamically, there is a possibility of accessing the device info memory beyond the allocated limit which can result in segfaults. Fixed the logic to prevent illegal memory access. Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") Signed-off-by: Naga Harish K S V --- lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index 8870071a8b..6ec435af3e 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -582,7 +582,7 @@ txa_service_func(void *args) RTE_ETH_FOREACH_DEV(i) { uint16_t q; - if (i == txa->dev_count) + if (i >= txa->dev_count) break; dev = tdi[i].dev; -- 2.39.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-23 09:36:28.559518112 +0000 +++ 0006-eventdev-eth_tx-fix-devices-loop.patch 2023-02-23 09:36:28.166168835 +0000 @@ -1 +1 @@ -From a870c7e863a5996eb842befa30c6a7d3f9729fcf Mon Sep 17 00:00:00 2001 +From 70b0def9c8018d12a6c8e2cdbf71db69bde1c0eb Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit a870c7e863a5996eb842befa30c6a7d3f9729fcf ] + @@ -16 +17,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 2 +- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 2 +- @@ -23,5 +24,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index c780ee1264..6e9bcb1b79 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -678,7 +678,7 @@ txa_service_func(void *args) +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index 8870071a8b..6ec435af3e 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -582,7 +582,7 @@ txa_service_func(void *args)