patch 'eventdev/eth_tx: fix devices loop' has been queued to stable release 22.11.2

Xueming Li xuemingl at nvidia.com
Mon Feb 27 07:58:44 CET 2023


Hi,

FYI, your patch has been queued to stable release 22.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/01/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://git.dpdk.org/dpdk-stable/log/?h=22.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=478bec21d0b46f3dd243e4d028f596d7cde7d733

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 478bec21d0b46f3dd243e4d028f596d7cde7d733 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Date: Sat, 7 Jan 2023 10:40:58 -0600
Subject: [PATCH] eventdev/eth_tx: fix devices loop
Cc: Xueming Li <xuemingl at nvidia.com>

[ 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 <s.v.naga.harish.k at intel.com>
---
 lib/eventdev/rte_event_eth_tx_adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index 88309d2aaa..ba7a1c7f1b 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -676,7 +676,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.25.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-27 14:08:41.525170700 +0800
+++ 0017-eventdev-eth_tx-fix-devices-loop.patch	2023-02-27 14:08:40.729237000 +0800
@@ -1 +1 @@
-From a870c7e863a5996eb842befa30c6a7d3f9729fcf Mon Sep 17 00:00:00 2001
+From 478bec21d0b46f3dd243e4d028f596d7cde7d733 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit a870c7e863a5996eb842befa30c6a7d3f9729fcf ]
@@ -16 +18,0 @@
-Cc: stable at dpdk.org
@@ -24 +26 @@
-index c780ee1264..6e9bcb1b79 100644
+index 88309d2aaa..ba7a1c7f1b 100644
@@ -27 +29 @@
-@@ -678,7 +678,7 @@ txa_service_func(void *args)
+@@ -676,7 +676,7 @@ txa_service_func(void *args)


More information about the stable mailing list