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 74A2345CF8 for ; Wed, 13 Nov 2024 17:15:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7020240A89; Wed, 13 Nov 2024 17:15:20 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2079.outbound.protection.outlook.com [40.107.22.79]) by mails.dpdk.org (Postfix) with ESMTP id 1FD17406BC; Wed, 13 Nov 2024 17:15:18 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tlw4r7EveHl1uDwpkZ1zSjS7oTKsnd5ZfomUvHjfCSmQ+Z1aQseB3MfjhS9X94W55ktT1Ig9mZdncpsWWPfcN9y6ZtAdMZGUxa1ZkekdJraW4JMYr6r+GoC66rsxezWAxSDj+TVJvPwvK2UHS5JzumNKWL/q70/5wXFmxpvVbMCKncRAElg0zvImV448BuBNxo0lp5qUJ3oVEBzHDBgudhdB1d3C/FbzGGze+nqNlHG812I0/XEQvMwnNoDE/ltGTAdMaY4aSSITWEGAWS4FC1pFdxWrl9KV1s5HXfBT9XNg3UD+Yeaw7ZIOXIhquCBZ7ykHWLJJKwHVk/skH+td4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=f4w8skVrGwYHM0SYRJmY2MZl6JshLXGqSi10GoGMVDE=; b=vcUteQQlY5yiZirtuspPFVnU/P6fuKVzx4Lzgl4/LG6VLGvhH99jQa+ZinGMkRHxe5LLSpmQYaKE/ULFYPAbkzcZeKMzGrGV9YcSQ+aueM0Ud8OqvezC91n5mGinylz55SXtuIVmnZXk0jSsz1S+DmJkTyyb1GXV80dp/nZeaQ/llyaJnA929kFYeAHIQ+or6Z6Sh9Pa8LVwaKsPux1gVjBGXKq48PLGD5v/1wMxxlOjZa4Abs+3gp9abjp1bWy0MsKX61A8h2fc71daCl6vyed8Ozz+bG/1EwjZO5xOqnWv7UzFEw2zzoYh3eMzWDSxTxP6dBypqXAiIUVRn2mZNw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=f4w8skVrGwYHM0SYRJmY2MZl6JshLXGqSi10GoGMVDE=; b=aoPkhx+6wOd8iaiBWjkZ86E8F5eqsEcN47b3G+57u/+TGC6n83aqCsdamYyS8clcElfRdZYq3XZu6p4aPYSpNR2gfKCtKpYWIzPWmKKD3qonRscxbBhldct71Xdd2+COWDQqNdiQ06m9jUZ+Jn8FlDrUp5Aswyf57qHePdLgXVgRaQjgiaRzf27ylE2RMoA4DxNeIb1YZZAMovJkKk2wr5IiEHaiYiBIpAL8AKnJ7ULQLG5LvxmzPzPrDpoDPQI2sLb0MZAJs6aZBKvW449LqBFj5+IdsR1uFyJ6KoyHAlFzcAy967NesTB+2ExMFj6cbJivHr2aLPJ548os0kp0/w== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by AM8PR04MB7921.eurprd04.prod.outlook.com (2603:10a6:20b:247::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.17; Wed, 13 Nov 2024 16:15:16 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%4]) with mapi id 15.20.8137.027; Wed, 13 Nov 2024 16:15:16 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: stephen@networkplumber.org, pbhagavatula@marvell.com, stable@dpdk.org Subject: [PATCH 2/2] examples/l2fwd-event: fix spinlock handling Date: Wed, 13 Nov 2024 21:44:55 +0530 Message-Id: <20241113161455.2649551-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241113161455.2649551-1-hemant.agrawal@nxp.com> References: <20241113161455.2649551-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0019.apcprd02.prod.outlook.com (2603:1096:3:17::31) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AM8PR04MB7921:EE_ X-MS-Office365-Filtering-Correlation-Id: 5ae080ca-6cf2-4d92-2096-08dd03fe5c1c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|52116014|376014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?pHb78IshjNG9dGYtO7P8xyCgvWOleMYp9QyvERoaBl9pz8r2O9g8EOrk2mf6?= =?us-ascii?Q?lh+2ieRWZz22tOqH2uPHKSyygybQ8AAH24+DO+ZJTauyehMnnraCnGq4WNVM?= =?us-ascii?Q?PuviQhXvfogMy3rLWC/sgvLFJHmNuPODPGsPtlgSxTvGRvj/Jw3y6sIe3WQO?= =?us-ascii?Q?a/b8K/npWEg+dyym8eRCcN7qRQ7Iwr1MfbwBbFuPdrPKLZLjV4dCO7jtMAp1?= =?us-ascii?Q?gggzCY5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nc01yUC?= =?us-ascii?Q?SbsVRSz0+VgjqHemfBci4pdSPbjng14O5WhTYt7d3qgoPm2aCf6aHyQYfE+g?= =?us-ascii?Q?mJbUjCbtQF0iEp1TMBSkMzxFulVOtffyfc8Irp8vH+FoXs5xURNL+67gxtes?= =?us-ascii?Q?Xjampk92PbZJQ/dVc5hEt1iRCgn+PA0r/OcycOEW96SKfcjo78Slt3lOIk3n?= =?us-ascii?Q?S2kpq2Gp4lixMuG0dBg1h5hwVupw7lled2gjqKZE52XIAggc8Y5N0KoqCxto?= =?us-ascii?Q?BD9TrNQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(52116014)(376014)(1800799024)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?/RCx6NDb+mRjLYCHI8ynY6Tr7jj7T5L5IIgT+y5ryv4nSjvJPWPoFl7lL/p3?= =?us-ascii?Q?XyoX7MWpXpGMqKpgNFDGgTjNpxQudAmzZjGUfDM54pC4ecFaXXMKVuyyaqwU?= =?us-ascii?Q?I/ovs5/sYejL/XTvwIz2CnNealIyjFmISspGOitYPhET3fd56/GIUyhrYFna?= =?us-ascii?Q?CeRv0r9q3w239O0cVBNyq27eyu7e7g/fz1zYZgLuGiGBp1rbTQsOTnpP1fs2?= =?us-ascii?Q?u95BNMD1iTik0rzE4thlOU1rIWzBlTz/IvYcI6WwbFqBiNfYx4tO62LDCIRZ?= =?us-ascii?Q?3dCsiPcqryE6YayKl+HbVS0GbLd9m1fsEC+eiJ69bZhBzEGuKggtZUJ5fVTH?= =?us-ascii?Q?JOUxboAZnUlv2+sv8WKPRtk2rSiREIQwkNSgrcsZ685gianmOxyoGqGtPuH4?= =?us-ascii?Q?2b6/vA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ljCVYRQQBGAsG?= =?us-ascii?Q?aDEtsNAU+0yPFuEmWWnf92Rtnsk4nM0r2zvwt6Rk2wqM4acWTkniJRgdPCDK?= =?us-ascii?Q?VrBvDEYJ4eJBOoZb7chQxOQkxru/YvIHGsGu9yH6Wd8pHFjhKhtIxyau5y0j?= =?us-ascii?Q?mQzSy9ly94sTt+OkYb0cMoWHdpzjfxj96woMX6n5jt0k31ctFxGHo8cqFJPg?= =?us-ascii?Q?coZbPt+e271adJo1k4evWRJxMOntQqneq1nvu9JIuPgjAakXfLMkBywDlEXu?= =?us-ascii?Q?uVOMy7qb9fgkA2PcUkcxYrJXGe9pFAIkGnPUQeGu/bLq9KCO+sFNBjiYPAMe?= =?us-ascii?Q?zg=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ae080ca-6cf2-4d92-2096-08dd03fe5c1c X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Nov 2024 16:15:16.1923 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: IFrNCcYfcaGNjThRaRn7vLL9ruhNFEn9RYk+6ANdtTCxQqIp4Rrbf9z++kfBpWc8cQDa7ePODvsv1lUOiu5h2w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7921 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 Detected by pvr-studio Bug 89-93: very suspicious synchronization The analyzer issued a pack of V1020 warnings that a resource might remain blocked. Fixes: 080f57bceca4 ("examples/l2fwd-event: add eventdev main loop") Cc: pbhagavatula@marvell.com Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal --- examples/l2fwd-event/l2fwd_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c index 22472027b9..416957384b 100644 --- a/examples/l2fwd-event/l2fwd_event.c +++ b/examples/l2fwd-event/l2fwd_event.c @@ -141,6 +141,7 @@ l2fwd_get_free_event_port(struct l2fwd_event_resources *evt_rsrc) rte_spinlock_lock(&evt_rsrc->evp.lock); if (index >= evt_rsrc->evp.nb_ports) { printf("No free event port is available\n"); + rte_spinlock_unlock(&evt_rsrc->evp.lock); return -1; } -- 2.25.1