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 90E5BA054A for ; Tue, 25 Oct 2022 17:08:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D1F042C34; Tue, 25 Oct 2022 17:08:52 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5F73842C38 for ; Tue, 25 Oct 2022 17:08:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666710529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G4VZX7iMxJ+QM7rRbvXX1Dg2oQBwJPRbJ7HwealsJ8w=; b=EfwUhwkiYZcKsB/VMN0CsjzC5MUEpwXw/F5wtPZlLnf2yDMwiEZE6eJanGyiyL64N3YPAS WCmyIibD8k5nnHxmu3IvRXJefQZ3lFXEWZvuvU+C7MXTwLaPfqUKFHdiuMWhlm9kA/HfvR HC9r1j+E0v6eXJRHzbMc/kVKpPy2QKc= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-371-gkGsN40POQenaVDnotAWVg-1; Tue, 25 Oct 2022 11:08:47 -0400 X-MC-Unique: gkGsN40POQenaVDnotAWVg-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 293CD280A020; Tue, 25 Oct 2022 15:08:39 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A7BB4A9268; Tue, 25 Oct 2022 15:08:38 +0000 (UTC) From: Kevin Traynor To: Naga Harish K S V Cc: Jay Jayatheerthan , dpdk stable Subject: patch 'eventdev/eth_tx: add spinlock for adapter start/stop' has been queued to stable release 21.11.3 Date: Tue, 25 Oct 2022 16:06:24 +0100 Message-Id: <20221025150734.142189-29-ktraynor@redhat.com> In-Reply-To: <20221025150734.142189-1-ktraynor@redhat.com> References: <20221025150734.142189-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 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 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 Acked-by: Jay Jayatheerthan --- 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@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)