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 64F38A00C5 for ; Wed, 20 Jul 2022 10:26:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C93441147; Wed, 20 Jul 2022 10:26:33 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2052.outbound.protection.outlook.com [40.107.100.52]) by mails.dpdk.org (Postfix) with ESMTP id B57F34003C for ; Wed, 20 Jul 2022 10:26:31 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S4fA+QAKYHx/20O0pY8syYl37EXFRlLfJIXTRmSok/ePSwbqh/wjLudTe/Jq9E/EGDCO6jjJcTPpz8lDOSrl1+ywpn9BL4MIFiTgvLr8+AXUrZRkV+qHwD8lcWVNGERBtg19Vg495P+CnEDu8OFf+iuGKzULpLqnK1qoFEOwTepny0GVk1sBX3LpwAdw1EuYNWgxAFeHxkFAKqZaIOE/jzYavwsr9RfMmfnv5VWa/iMVyiLYClsZSx14gNdU8tNZFBxEyujYUliRLj8ZgARVDlJuJarbQSW9iGd8/3r6JguRvuR26dnPWzFDwIVSPkeotXqiIsZBACa+UgGAM7FVPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1M8nTngSn5vMYDFwBGBm7XDIns64/z1QK+VGQJFgizI=; b=X69dWGo6jdaK9W9HO6+No2+eXlxbLUVJcBS4EasqESip6fU8fmf81eTKE69+DYnlDpKwserwiZuW8naFTqV8GtU8b6J8sCkr/Ko+DTFcc2/XBlmtKuv+bxZEFSVsFA93lwv23Z/kxnto6r4SHU9i3UiB3AuNyDrPAdln1Ibb/FDh4ATOfvIwrh7pI12kei/WQuES/GQ0yUbqqbgtC62aCb0XHCEAGqrpz8NvycUJ180FyVKtXJvVRlBaTBGUAKBC1EqLgi7Z7gy5xig5RI/VWoNHjsVpAD5lFUGFHCv2HMJ8o6UPXcUGhYh3MvKLzb2m03XLFYJYUgMf81ewxCum4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.234) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1M8nTngSn5vMYDFwBGBm7XDIns64/z1QK+VGQJFgizI=; b=jOztk6nLCuaocinn8L/9PCFOEDPMpMhWSCMZfp4O9N+JtOvlHjwSPLA4IsnhBeavuJFy17g6KDY2ZZeM33Qg5x11LRC9/63ufgSozjDBYc6J15G0tDzRz6jnI282LrRXOFwsfm7OP7pw/QnEGoLbPuS88Kx7spAFc9Xm37NYOMGf1ZZz744ri5BqqS4hu1jpuBmUPJhAHmD4Vc7Qbq/kB1OWbTEZ5PHUbbXQi9Emd6EjuICFRB7EiKbOdnttEPT5+RxQX2WI0CUWxCoisgmtFgzgXMRLeEy+8BNq0ZU8s6k8GRM0s0Lpn0kvNdMmuUHTCQLPOQiVdbFBFvAGGFg/tA== Received: from BN9PR03CA0749.namprd03.prod.outlook.com (2603:10b6:408:110::34) by DS7PR12MB6287.namprd12.prod.outlook.com (2603:10b6:8:94::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.24; Wed, 20 Jul 2022 08:26:29 +0000 Received: from BN8NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:408:110:cafe::28) by BN9PR03CA0749.outlook.office365.com (2603:10b6:408:110::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.12 via Frontend Transport; Wed, 20 Jul 2022 08:26:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.234) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 12.22.5.234 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.234; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.234) by BN8NAM11FT054.mail.protection.outlook.com (10.13.177.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5458.17 via Frontend Transport; Wed, 20 Jul 2022 08:26:29 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL101.nvidia.com (10.27.9.10) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Wed, 20 Jul 2022 08:26:28 +0000 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.26; Wed, 20 Jul 2022 01:26:26 -0700 From: Xueming Li To: Naga Harish K S V CC: , Jay Jayatheerthan , dpdk stable Subject: patch 'eventdev/eth_tx: fix queue delete' has been queued to stable release 20.11.6 Date: Wed, 20 Jul 2022 11:21:23 +0300 Message-ID: <20220720082132.3954126-54-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220720082132.3954126-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> <20220720082132.3954126-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 36e53258-cc89-4f0a-1082-08da6a298b87 X-MS-TrafficTypeDiagnostic: DS7PR12MB6287:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?cF5OEZj6M8zMS1HnULDUXYuEAjkwoLJ2zMRfxwmJZpIqys/9j/+naMtQVLRZ?= =?us-ascii?Q?mzMyeRt7+muvc7otiOCcACv/+i2nQwC8u7CiOUggCAYktuF+hN0/i+Eh4I2w?= =?us-ascii?Q?kTn41njHtYOCggI+cQt16WE+DZx3Ni7V2n8BY9BQsZFvOKD5t0ZY4e5b2809?= =?us-ascii?Q?b7at5KPjaieI6I6a8a3G0YipN9NDB8zygefAf8kWfWJq7Pen7ZsgKIXRs+ML?= =?us-ascii?Q?+50lgm0YHYjZo4VPzaRJqKkd9aKtlVpt13j5ORF16sLMDNVBpfm2+422UQGk?= =?us-ascii?Q?giVVmeOSI++1BzgdUmmIqe0ujS4RMIAnQiMqz2/21EpVJ0qIbpXMSQU/q/Ev?= =?us-ascii?Q?u4KgAhrHyrXnOGB2q7u/Atw+iU7laWA8rNCDMKJDRiABNrIt8jVNCJb1rhmO?= =?us-ascii?Q?hTeIlxFCzkOpI7r8aTxHPb+/baUJfw9/Xm5YbYuYuYR8VRyGCMhc2h2gzS7I?= =?us-ascii?Q?ez3t+2tVA4c9YZnI3uoAl5sQks8bRhb5NMysY2VPVdfqKWI9IFj4MBLtdkiW?= =?us-ascii?Q?4S6TsuB52Bk4GzWj/DoTjafjmw+15XP765HJRN7ewkK7QGfyQwKJqRrLAfd4?= =?us-ascii?Q?f7xG9o9dSskTw7q5CaK2/JCx2vSA+2/hbsRnhIj/E4TJgQzqRc5Be6izWAiz?= =?us-ascii?Q?12QyP/gNfyUMQpj7ucdFQC3KLcIA29vouoylP20jT+2HzDFfwqZsQq5QDpkp?= =?us-ascii?Q?zSjm6AnVfFMe8HdKx/WWqD58DCg06z3o3Jnayz5rQZVq59Ps6ao/hNSPz5by?= =?us-ascii?Q?xp21j5C2FB7Y3muneva9TE7mMDe97ZN5G1yL42RiK4IykymoRHGcKuUhW1pD?= =?us-ascii?Q?DcPsj77yuwErKWZFeg0AsRiv1stTnxnAv6wfEyvLa2PVhK7BzXzUX+n/zeCb?= =?us-ascii?Q?lHN7JP/7VOINI9Kaf7VPAPebaaOXGUqEUh4okXuzsVc0dFQ8jEnmqd2OBC/3?= =?us-ascii?Q?VL8Q2JEORqASNbdB1tih+w=3D=3D?= X-Forefront-Antispam-Report: CIP:12.22.5.234; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(396003)(39860400002)(346002)(136003)(376002)(36840700001)(40470700004)(46966006)(2616005)(8936002)(4326008)(6286002)(16526019)(1076003)(70206006)(426003)(6916009)(83380400001)(86362001)(82740400003)(336012)(55016003)(2906002)(5660300002)(186003)(36860700001)(47076005)(40460700003)(26005)(40480700001)(81166007)(53546011)(7696005)(54906003)(356005)(36756003)(478600001)(6666004)(316002)(966005)(8676002)(41300700001)(82310400005)(70586007)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2022 08:26:29.1715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 36e53258-cc89-4f0a-1082-08da6a298b87 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.234]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6287 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.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/22/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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/377b5aac80c8b3dce8d5eb01c2c0de05fd8672be Thanks. Xueming Li --- >From 377b5aac80c8b3dce8d5eb01c2c0de05fd8672be Mon Sep 17 00:00:00 2001 From: Naga Harish K S V Date: Thu, 23 Jun 2022 15:35:11 +0530 Subject: [PATCH] eventdev/eth_tx: fix queue delete Cc: Xueming Li [ upstream commit 881d4b4d8587419197815db57b94fc58ee487445 ] Add spinlock protection in queue delete function. This protects the data path while the queue delete operation is in progress. 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c index 6474056c90..f2b7d36657 100644 --- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c +++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c @@ -845,9 +845,10 @@ txa_service_queue_del(uint8_t id, txa = txa_service_id_to_data(id); + rte_spinlock_lock(&txa->tx_lock); tqi = txa_service_queue(txa, port_id, tx_queue_id); if (tqi == NULL || !tqi->added) - return 0; + goto ret_unlock; tb = tqi->tx_buf; tqi->added = 0; @@ -857,6 +858,9 @@ txa_service_queue_del(uint8_t id, txa->txa_ethdev[port_id].nb_queues--; txa_service_queue_array_free(txa, port_id); + +ret_unlock: + rte_spinlock_unlock(&txa->tx_lock); return 0; } -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-07-20 15:01:01.303003670 +0800 +++ 0054-eventdev-eth_tx-fix-queue-delete.patch 2022-07-20 15:00:58.794333695 +0800 @@ -1 +1 @@ -From 881d4b4d8587419197815db57b94fc58ee487445 Mon Sep 17 00:00:00 2001 +From 377b5aac80c8b3dce8d5eb01c2c0de05fd8672be Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 881d4b4d8587419197815db57b94fc58ee487445 ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -16 +18 @@ - lib/eventdev/rte_event_eth_tx_adapter.c | 6 +++++- + lib/librte_eventdev/rte_event_eth_tx_adapter.c | 6 +++++- @@ -19,5 +21,5 @@ -diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_event_eth_tx_adapter.c -index c700fb7b1f..b4b37f1cae 100644 ---- a/lib/eventdev/rte_event_eth_tx_adapter.c -+++ b/lib/eventdev/rte_event_eth_tx_adapter.c -@@ -891,9 +891,10 @@ txa_service_queue_del(uint8_t id, +diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +index 6474056c90..f2b7d36657 100644 +--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c ++++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c +@@ -845,9 +845,10 @@ txa_service_queue_del(uint8_t id, @@ -35 +37 @@ -@@ -903,6 +904,9 @@ txa_service_queue_del(uint8_t id, +@@ -857,6 +858,9 @@ txa_service_queue_del(uint8_t id,