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 D8891A00C2 for ; Thu, 3 Nov 2022 10:29:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D489040694; Thu, 3 Nov 2022 10:29:08 +0100 (CET) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mails.dpdk.org (Postfix) with ESMTP id 4771D40693 for ; Thu, 3 Nov 2022 10:29:07 +0100 (CET) Received: by mail-wr1-f51.google.com with SMTP id cl5so1690243wrb.9 for ; Thu, 03 Nov 2022 02:29:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lEgNikHETdgDoMMVupUM4eIt79p1Xh8uV38fDaBYOCQ=; b=YBULTZCKeOmr6i78unpDnXaIa5HN5YPT6EzjXL4m+PdMLSjPH9Ia65+tgg/6xg5+ko dOlJHICb4VGJMp8t0lCPilxZXoIVztc6+OH017pKgBNF/TPv85ooG8BLBVQSCQ62fl4Q 8SDqhvfP99eExuKVlGDtHDKQj8GtaZHl4FIzvEDvA8NSk+0w5DS7Oz5TkS6Ezr2fjEtD k5JZeDdUOL9gCeXfHWHqyt/hLL4WWnh4ga7Y8zOLrGFN4lIybvROGHiX2dseirGRhk+O Mu+v9mss75EwuYARY0B1PpcU+sb/ymmF1wHfrT9htejTLDwLo1hvRUfiY+bS2MUPQdOR 2i7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lEgNikHETdgDoMMVupUM4eIt79p1Xh8uV38fDaBYOCQ=; b=dspviH73e4ZC3grdXc54k+niaMqnNiCfrhtTgjvhoxiP6o/eUeTgx5mdNHR7pBgNEW sP8QLuEm1Vch/UTvp2Eku2dPLWTTfJmYQc7TMCVmTv02o6XwrgwJ3JQQE1C098CJGG1c MKL9sSgbCPbnv3+v+lNCae8gFb0oM18N3nP2TJIwnZY2Kzmrae/IC9VmEdJQa7vjXN7z +weXuvFQuwbbZPQ/J2BfPkMgwDTj4qJpp81na8aC3efHSPCrFxBku3MpOOygCeEZdRgY bXQBW+oKw2RBsE5D5EaA40DlwmGD87cj6b8oB8xuTikELi35Qp/wwCUQcDFwNcQChA4n oTpg== X-Gm-Message-State: ACrzQf1nJUDToEm/GfkUhQsm2A1r08No0yD+1Wnn25rnm/Mo8QR9KqfQ 3lp3TkBszgK+AyJQPWXOXaypbq6SS52GVQ== X-Google-Smtp-Source: AMsMyM7GHxqW+ucrNiI2sxs5C8rU7rz5E0W3EYw2iXedL1cMHPGo588gu3+3fxwm7G8cBMtkIwLqqg== X-Received: by 2002:a05:6000:547:b0:218:5f6a:f5db with SMTP id b7-20020a056000054700b002185f6af5dbmr18144019wrf.480.1667467746961; Thu, 03 Nov 2022 02:29:06 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id z11-20020a5d654b000000b0023662d97130sm357529wrv.20.2022.11.03.02.29.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Nov 2022 02:29:06 -0700 (PDT) From: luca.boccassi@gmail.com 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 20.11.7 Date: Thu, 3 Nov 2022 09:26:38 +0000 Message-Id: <20221103092758.1099402-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221103092758.1099402-1-luca.boccassi@gmail.com> References: <20221103092758.1099402-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 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/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@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)