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 6304F45D01 for ; Thu, 14 Nov 2024 08:44:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A56E400D5; Thu, 14 Nov 2024 08:44:58 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2083.outbound.protection.outlook.com [40.107.20.83]) by mails.dpdk.org (Postfix) with ESMTP id A818842D97; Thu, 14 Nov 2024 08:44:56 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vDga7sqWhfETIVon2vduT6JlDv/vxWSj+++sqBACqH0yYNk9z9pZBA2kCcBUA4TE5FceaD3zEBJgoK2mTnLEgRYovZqGC5/8FXvQy7zGC6epYmiQSzNYys1aEowq2kxAN5lwaGk+LH4iTgvkzEHKVU2p21o6f6OM3HI9dMimLce6nFmlL9OeRV1FJ7/7+byttfdSKG6xFwTXc1gRthZC683iMN1W1iY1nr4FbAh8LW+2l30zGK2lKqBJb6XAMuLlW+dfK7kDyydwN4yMmk3i26XnHlf2cT8qaXqtrai+DDPs1lejFU5Bb1EvmRWMghg9alDd/cOZqwjMXbWL9X5PpA== 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=7gTGXVRf5bRWCE3ekTUxejEwHMLl+0ZloTqL1YG4YVI=; b=k0AGx96oBcswy6OH97vBRH58/OxXSf/+ozkvWok48Z4lazY24jXSrk+81Yi1ydPIz8ekg/puDElu+KDQWLCo2KtAK9c2F6HFioCwimC0x7wChYxHPg7EQYWO8w9jqqTmDU8xDLb5aHcT5V5ixcRxuIiVEVzFrssGdA+1zXkERg+sImJXPXcQDwbzuYESe1Uf4rWTJ6acvPHIZ5wde/WHj/Su2l5xUjSTfAD9gMcRL9cWRDpkQN11/+sVi+wdb0ifswnmLR2ePlQS4KspFksI3JLNI0bxRHyLP9fulX3WZq572BAF5BXw8XPQyREnCQ6YEN4OFEzMfpTz1FlPCSaWcg== 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=7gTGXVRf5bRWCE3ekTUxejEwHMLl+0ZloTqL1YG4YVI=; b=DXhUygmeEGF7y0kvpjkZ3tOMdYnB09zjwsdfbDXaOYgXvSHsosSqVEFeWNWFmu8mNgxV+n8zKs7gILDXNaYNYCyuuZz/b2URnOQUW2YWJT38f7EF53YYR8GuYVYehrIAISCSB79joWfjDM4hmbnzGlwGGJjbAJ0ZsERyy3wQsifXkG2vquFGGUfpE1H44oIuzXBNQXarnZVKb5LAw8znFjBjx2W1ixM6GIiwKAjE+y0mpvc/mRPe9BAJ5cMdkN8gvmECgtL/+Y6x19+Lzcfj6TUeIe7VSa5RO1g/B7YPNgt3Ffj4IntJeAyR5vhNeyrd0TVFh4Xvg3iu5j/YMX3oIQ== 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 GV1PR04MB10380.eurprd04.prod.outlook.com (2603:10a6:150:1cc::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.28; Thu, 14 Nov 2024 07:44:55 +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; Thu, 14 Nov 2024 07:44:55 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org, david.marchand@redhat.com Cc: stephen@networkplumber.org, pbhagavatula@marvell.com, stable@dpdk.org Subject: [PATCH v2 2/3] examples/l2fwd-event: fix spinlock handling Date: Thu, 14 Nov 2024 13:14:36 +0530 Message-Id: <20241114074437.2943885-2-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241114074437.2943885-1-hemant.agrawal@nxp.com> References: <20241113161455.2649551-1-hemant.agrawal@nxp.com> <20241114074437.2943885-1-hemant.agrawal@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0007.apcprd02.prod.outlook.com (2603:1096:4:194::23) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|GV1PR04MB10380:EE_ X-MS-Office365-Filtering-Correlation-Id: ea8f66da-1cba-4311-a2aa-08dd04803ae5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?n+A+iTWvAEW494DWaoItvaVHUWlDEUDgxkaHv4fdtS9RZQ0JYKTLuCBO/crx?= =?us-ascii?Q?DtkNEr55hvNJ9y4cMKi4Cu3ZlZ7T3Xtz1whB685A9DDybty3K0XShdoMqMRT?= =?us-ascii?Q?Y/HAYX1Q6C/ShcWTzxU7Ypm6/ZKbl+vNHke1sToyQDkRpbWyPCvzisV3r3zX?= =?us-ascii?Q?vk/sYgAdlaxQB4gnDXIbgWwgQQB4Ky3N5cndyltaQ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xuq3bxuT6zrg8UY2Cp39GMZW473OwNCN1h0kR53eHGupbJynsr2LqHP9?= =?us-ascii?Q?CHfzOSyrkkeUz6rTV3jAr4gijZ2qdF7wNEiyi3Hzlk62sE6yo5QiiYmhsGfG?= =?us-ascii?Q?PLHhjSEYNMP2tBTeYHhHa6T6jYE+N1l/B3ioo5Mit0Eaxj2Fa7w+oWL3RNuQ?= =?us-ascii?Q?18f+4TTi3uqIJJd0zWyzIW4G9P9FxXbQVVsVwV8wGC8EzePHRPsXYHbQv4hg?= =?us-ascii?Q?/uKP5unt+bpNebqFevk2mBZ2BRhCU8kj7fHh+u72H08n6VsYxD6yUN/hjSOt?= =?us-ascii?Q?XCSVqxE=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)(1800799024)(376014)(52116014)(366016)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?fsCh2ZiBApgjL+JJwKOdjesR0XNW/rJKX6a4RLI3OdrokfNDRZw2czfn27p5?= =?us-ascii?Q?96zuwWl7B8C+n2R2pvtezBRj0QW3VQbamz9LRDpNfqjWBi4m4Siyq2BJ339p?= =?us-ascii?Q?UjE8LuxNb1PH/xw7wqF0HZ8QMwmksMR+fkNTJdyPy5mvdnxeyQakb5lcqEeL?= =?us-ascii?Q?szu2nrsPtlJ9XnKADcFMyHDGtlZbzAfJE7UammvX2W4mtsi5Lpi8a/x1wy29?= =?us-ascii?Q?AKGJK5doOluLFz63J70EXML1Ut/qHdunI+K32Wb8C1BNSYaF/0emxtKXWLI8?= =?us-ascii?Q?Ncb32PJygeyxK/XkthK+jU29s909N2UWqK4PrUqhb284pYfsp49ARa3TJPLx?= =?us-ascii?Q?Hm0KDd8SV4Rxd/eHW/0oyn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d+?= =?us-ascii?Q?iCh/DoFJOZ9zS0gHY8R67/bkhFkS7SP6vdcAOFLTrMwaALiezIVe9MVYSTY9?= =?us-ascii?Q?rvhLZqZMjnb5PgNj5OWSPuASJkVOillhu6wD/id6NzpyTdb+v4MXTXkrFt7W?= =?us-ascii?Q?XOs3DnASp3rg3pxhDs0baJCsloAnMX8cresdDJSu4w9E0mtA496+eQ8ktYXv?= =?us-ascii?Q?U1Q6mJFWzhKV5pidIP7namDkYptv4gWTEoBfnQzFNsT+knQdc4M0laQQJgzK?= =?us-ascii?Q?XXiBTc7vCuOB90vOjW3VdqRUTzwzqneCt5UUz6WROb8bDxX3Kr7tbHC0WZbk?= =?us-ascii?Q?F/3BjBauKca+DNc5s8fyfNfJ+BD+qdlCKdx58eac9LBpF45Twqw8+EpWUG+d?= =?us-ascii?Q?0g=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea8f66da-1cba-4311-a2aa-08dd04803ae5 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Nov 2024 07:44:55.0080 (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: MURRVn7MzXAFBiZJcSybfMD/cxnBqFzmlGfZlNC0stEv+OvsJAGLxFY13b4QDufdduEQ9LURaYpmovqqVeq+2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB10380 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 pvs-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