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

christian.ehrhardt at canonical.com christian.ehrhardt at canonical.com
Fri Nov 11 12:38:27 CET 2022


Hi,

FYI, your patch has been queued to stable release 19.11.14

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/18/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/0cd85a22bbd14255a078bd506c742a201cc1c51e

Thanks.

Christian Ehrhardt <christian.ehrhardt at canonical.com>

---
>From 0cd85a22bbd14255a078bd506c742a201cc1c51e 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/librte_eventdev/rte_event_eth_tx_adapter.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index e64c7ff2b6..0166e000b4 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -43,7 +43,7 @@
 #define RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \
 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; \
 	} \
 } while (0)
@@ -467,10 +467,13 @@ txa_service_ctrl(uint8_t id, int start)
 	struct txa_service_data *txa;
 
 	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))
 			rte_pause();
-- 
2.38.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-11 12:35:05.139289096 +0100
+++ 0010-eventdev-eth_tx-add-spinlock-for-adapter-start-stop.patch	2022-11-11 12:35:04.721191776 +0100
@@ -1 +1 @@
-From 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 Mon Sep 17 00:00:00 2001
+From 0cd85a22bbd14255a078bd506c742a201cc1c51e Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
@@ -15 +16 @@
- lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++--
+ lib/librte_eventdev/rte_event_eth_tx_adapter.c | 7 +++++--
@@ -18,5 +19,5 @@
-diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c
-index aaef352f5c..aa7713bfa1 100644
---- a/lib/eventdev/rte_event_eth_tx_adapter.c
-+++ b/lib/eventdev/rte_event_eth_tx_adapter.c
-@@ -50,7 +50,7 @@
+diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+index e64c7ff2b6..0166e000b4 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -43,7 +43,7 @@
@@ -31 +32 @@
-@@ -502,10 +502,13 @@ txa_service_ctrl(uint8_t id, int start)
+@@ -467,10 +467,13 @@ txa_service_ctrl(uint8_t id, int start)


More information about the stable mailing list