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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Nov 3 10:26:38 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.7

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/05/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/2c193be289e8a2e7e65e2a85e42fe6168cdf54e7

Thanks.

Luca Boccassi

---
>From 2c193be289e8a2e7e65e2a85e42fe6168cdf54e7 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 f2b7d36657..c7048f8f36 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -44,7 +44,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)
@@ -468,10 +468,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.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-11-03 09:27:26.673656384 +0000
+++ 0020-eventdev-eth_tx-add-spinlock-for-adapter-start-stop.patch	2022-11-03 09:27:25.325421511 +0000
@@ -1 +1 @@
-From 2ab9869c01bbec4b0da0b806ef605b56ffed6e95 Mon Sep 17 00:00:00 2001
+From 2c193be289e8a2e7e65e2a85e42fe6168cdf54e7 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 f2b7d36657..c7048f8f36 100644
+--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+@@ -44,7 +44,7 @@
@@ -31 +32 @@
-@@ -502,10 +502,13 @@ txa_service_ctrl(uint8_t id, int start)
+@@ -468,10 +468,13 @@ txa_service_ctrl(uint8_t id, int start)


More information about the stable mailing list