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 45E3EA0544 for ; Fri, 11 Nov 2022 12:39:43 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A6E34014F; Fri, 11 Nov 2022 12:39:43 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id F31AF40141 for ; Fri, 11 Nov 2022 12:39:41 +0100 (CET) Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id AE40A423EE for ; Fri, 11 Nov 2022 11:39:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1668166781; bh=BS8xqAnz4f9NGjWqvON+KqfiEdoxhskftXp0j94wenA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lFU2Z7XS/qZnR58hNpJdfhgHMSWzSqVtDAtiwqfGbBLqxW6bjsK2utHPIA6QD8lJT qr/JcN77jfXo9cEz1dmqMdZ4/wRVqCFDc9+46uGF0kEPLhf+m9SewKiFK4HYl91Hs5 OPwkRamOFwbtS2krcrxFQEbXcBPXXdeM/rkhyZJDwwZBt8Z+4cMMS9n6Jz+FXcH02P Lu1KFo7Cw7auCIbOuc8ep2GkD9+OQDssDRx2Qz2QAN+4SQJP1gLS9GoYoXPPF2witB kpFL3f3v9Yfjzh1Bu+Nqh9kzWvrehvGGbstPyxu3uDH+ASbc/nZV8zdbXo9koBJ3fu xs8OgGuHDSMgw== Received: by mail-ed1-f70.google.com with SMTP id l18-20020a056402255200b004633509768bso3431877edb.12 for ; Fri, 11 Nov 2022 03:39:41 -0800 (PST) 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=BS8xqAnz4f9NGjWqvON+KqfiEdoxhskftXp0j94wenA=; b=M+Rs+ZhgKpE8xSBG9oKPQEUwoalJuJGwqgIUKmpibmoE8xxaxSrZRkotyqdHisJzim 78EjF2F+AqT/LRSvuFcxaFmDcyRp+gwlPa4lX7S5ZvRGbvW4d0LFquUWCKyys7j6iLm6 Da35ppGLrr8jzfo0h16udEJfav0c0e6NvbbtopDNLWoMSlBkhSkg4CY+hcGYAbRCdHW4 kgnwUBs0kyXt+eLm9nkLy7kr60fz7CBo1VQrTgIUd/1nJe2op10fXD/8GV2giMmAi0Au vKfYk+gOuwNKQ3Cf2BPzrken6I1OjEgD2TPnZgVKUvS52jrk6cVj4upRK2Stzh3bEr0v jI5w== X-Gm-Message-State: ANoB5pmlQKD3ZmWNJWaQrJgIPZVmjkraWuTX/IWQRQF8/iP8NGs6sVzt j2EMOieDPNWZCvivMGcX750Gzjh+ResgrElANGh6cffBFgtqRas2FKxV84ElX5lZZD7ZUZeE85+ ETxdcdan/w51X1/KcLSrvhCWC X-Received: by 2002:aa7:d4d0:0:b0:462:273b:6b5c with SMTP id t16-20020aa7d4d0000000b00462273b6b5cmr1100081edr.57.1668166778546; Fri, 11 Nov 2022 03:39:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6eqHgP/GA8TCprX76xmo3Dxr6S3Jb+PQpYtDDUfV5grCf9el2j2GtPgNagM75wvhcSp+1Rpg== X-Received: by 2002:aa7:d4d0:0:b0:462:273b:6b5c with SMTP id t16-20020aa7d4d0000000b00462273b6b5cmr1100067edr.57.1668166778266; Fri, 11 Nov 2022 03:39:38 -0800 (PST) Received: from localhost.localdomain ([2a02:6d40:39af:c100:1891:6c61:50fd:e567]) by smtp.gmail.com with ESMTPSA id kv20-20020a17090778d400b007402796f065sm784183ejc.132.2022.11.11.03.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Nov 2022 03:39:37 -0800 (PST) From: christian.ehrhardt@canonical.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 19.11.14 Date: Fri, 11 Nov 2022 12:38:27 +0100 Message-Id: <20221111113904.1549618-10-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111113904.1549618-1-christian.ehrhardt@canonical.com> References: <20221111113904.1549618-1-christian.ehrhardt@canonical.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 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 --- >From 0cd85a22bbd14255a078bd506c742a201cc1c51e 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 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@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)