patch 'eventdev/eth_tx: add spinlock for adapter start/stop' has been queued to stable release 21.11.3

Kevin Traynor ktraynor at redhat.com
Tue Oct 25 17:06:24 CEST 2022


Hi,

FYI, your patch has been queued to stable release 21.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/01/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/24f4f4450f43daa953cbde5d12c56deadbd371e2

Thanks.

Kevin

---
>From 24f4f4450f43daa953cbde5d12c56deadbd371e2 Mon Sep 17 00:00:00 2001
From: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Date: Mon, 25 Jul 2022 23:22:10 -0500
Subject: [PATCH] eventdev/eth_tx: add spinlock for adapter start/stop

[ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ]

Add spinlock protection for tx adapter stop and start APIs add
null check for tx adapter service pointer in adapter start/stop APIs.

Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation")

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k at intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan at intel.com>
---
 lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
index b4b37f1cae..6730345e4c 100644
--- a/lib/eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
@@ -45,5 +45,5 @@
 do { \
 	if (!txa_valid_id(id)) { \
-		RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id = %d", id); \
+		RTE_EDEV_LOG_ERR("Invalid eth Tx adapter id = %d", id); \
 		return retval; \
 	} \
@@ -469,8 +469,11 @@ txa_service_ctrl(uint8_t id, int start)
 
 	txa = txa_service_id_to_data(id);
-	if (txa->service_id == TXA_INVALID_SERVICE_ID)
+	if (txa == NULL || txa->service_id == TXA_INVALID_SERVICE_ID)
 		return 0;
 
+	rte_spinlock_lock(&txa->tx_lock);
 	ret = rte_service_runstate_set(txa->service_id, start);
+	rte_spinlock_unlock(&txa->tx_lock);
+
 	if (ret == 0 && !start) {
 		while (rte_service_may_be_active(txa->service_id))
-- 
2.37.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-10-25 14:18:59.207073877 +0100
+++ 0029-eventdev-eth_tx-add-spinlock-for-adapter-start-stop.patch	2022-10-25 14:18:58.383797991 +0100
@@ -1 +1 @@
-From 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 Mon Sep 17 00:00:00 2001
+From 24f4f4450f43daa953cbde5d12c56deadbd371e2 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -19 +20 @@
-index aaef352f5c..aa7713bfa1 100644
+index b4b37f1cae..6730345e4c 100644
@@ -22 +23 @@
-@@ -51,5 +51,5 @@
+@@ -45,5 +45,5 @@
@@ -29 +30 @@
-@@ -503,8 +503,11 @@ txa_service_ctrl(uint8_t id, int start)
+@@ -469,8 +469,11 @@ txa_service_ctrl(uint8_t id, int start)



More information about the stable mailing list