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 D536843B51; Tue, 20 Feb 2024 09:43:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 56CE2402B8; Tue, 20 Feb 2024 09:43:12 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2087.outbound.protection.outlook.com [40.107.20.87]) by mails.dpdk.org (Postfix) with ESMTP id 0484C4029B for ; Tue, 20 Feb 2024 09:43:10 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fSINbQr64Nii+4If8QojcTKPVtqnMv75TdWsu3efL41WmobuE3uA9Z+U+EAbT8tCV36q6QnbQi3UlGx6krtilkL+4KFsZ91Bf9slINkED4yvhgHZp5ktFr4mRm80bF3kVqey+KinOubKiSmc3haEPA81LIM6B6OwCBRYTvpqgmnt1QVNwk84ZXARI2SJ42BcmTzHK2GqlRouuwzJX4/P0AEuK9MxnGN3H8sKFkROydHMGYhvmzUc45AzC1rgy9E2hyssceo0aryB5HMdZLyGLwvWY7cfnidDEVwK+Tj8d9ysTAegOHROJOfgDKD1wBovHcSAh3hGR0dehCjLDSPbnw== 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=7B60dmDVho2Iwvhyep+T3tu4qrPkKVHrhUiIb6PK77k=; b=P5HvUvv50zD7MZDxcvwNTXWCEW6ArkXir9xsQnlFIwH+aO5kjRvUYzSSaG663t13MBzWmE92Usb/Z8tyS8fIbz3M9EHPQj0a7zVRsronQwxIUSkQ4EjtrwINEnOBD+Rmn3TzCcd9lxh+GHgpRz8fX0A5/hyPRwSNjudtZpTVVLbcx0vhomKdrQJuc9GnUGOXoQEW4oEpBEgeDeT+kmnLBG3Gyf5AhU4nf8TegvCt9Gb5g7I+Dy6B6T1y76bg9QRdJGOWDjcl5fctxhVMycyL+dmya2mnbfjfK/VzdfFXWgy3BFbCpfpJXgJDv0nMOK9Y5UaQGQXL82Mc2+xZrvJVnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 192.176.1.74) smtp.rcpttodomain=dpdk.org smtp.mailfrom=ericsson.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=ericsson.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7B60dmDVho2Iwvhyep+T3tu4qrPkKVHrhUiIb6PK77k=; b=GKWNikelJsf56cfeQlYyw5DRhmAxJwPIdkJeOZ9ujQmPgFZ9pQJLNo6vafLlS1uqpCHa+J/lIyaP7WxSdN8CgqbH0mb2tiTxqEsGsegGBJ+mxJvCEUah6BUx0jHjT5fYssjbsk/CfREvrPcf0aN2/2aCJF8C4PmsyVPMg9uvwzwwXAo4b+h+4zbV6gCpIhhtqzsgodNRGs24Ok8FMIvpgu58XHnHUJAWcQNaK9VFRKDKVKGRDM9KVHA3cDMRY29gyOmEzBeKuVHNNuCJNZpaoy/pvl5I8c4pHPePMSmMhUi04OfvPIop50VvLrpyaqFYibuXy53R4Cn6bNsrO1HtUA== Received: from DU2PR04CA0029.eurprd04.prod.outlook.com (2603:10a6:10:3b::34) by DB8PR07MB6459.eurprd07.prod.outlook.com (2603:10a6:10:142::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.38; Tue, 20 Feb 2024 08:43:08 +0000 Received: from DB1PEPF000509F5.eurprd02.prod.outlook.com (2603:10a6:10:3b:cafe::cf) by DU2PR04CA0029.outlook.office365.com (2603:10a6:10:3b::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.39 via Frontend Transport; Tue, 20 Feb 2024 08:43:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 192.176.1.74) smtp.mailfrom=ericsson.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=ericsson.com; Received-SPF: Pass (protection.outlook.com: domain of ericsson.com designates 192.176.1.74 as permitted sender) receiver=protection.outlook.com; client-ip=192.176.1.74; helo=oa.msg.ericsson.com; pr=C Received: from oa.msg.ericsson.com (192.176.1.74) by DB1PEPF000509F5.mail.protection.outlook.com (10.167.242.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25 via Frontend Transport; Tue, 20 Feb 2024 08:43:07 +0000 Received: from seliicinfr00049.seli.gic.ericsson.se (153.88.142.248) by smtp-central.internal.ericsson.com (100.87.178.60) with Microsoft SMTP Server id 15.2.1258.12; Tue, 20 Feb 2024 09:43:07 +0100 Received: from breslau.. (seliicwb00002.seli.gic.ericsson.se [10.156.25.100]) by seliicinfr00049.seli.gic.ericsson.se (Postfix) with ESMTP id E765C380061; Tue, 20 Feb 2024 09:43:06 +0100 (CET) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: CC: , Thomas Monjalon , "David Marchand" , =?UTF-8?q?Mattias=20R=C3=B6nnblom?= Subject: [PATCH] dispatcher: add cache guard to per-lcore struct Date: Tue, 20 Feb 2024 09:35:04 +0100 Message-ID: <20240220083504.488208-1-mattias.ronnblom@ericsson.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB1PEPF000509F5:EE_|DB8PR07MB6459:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b1e7dab-4272-49f2-f5e8-08dc31eff657 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OnyPSu3yhwFY1BAH+FpHT7F6mRcZncyH+js8HMfG1+WXfysfWeGvJzDIGko7QKz7oFnKXqxf7sEoCdKpR+odYZ2iE/XS4i4dIOZVA68nBXCSKabaE7CvQrffKhTH5/0tM9am2lH76eIqwTw1JgpxC1IRndV1rDVSIxKc2RxcVjTY7ZnWm4oDxwsRTDnoNL9rDVeKL6cMo9iDTqe/vCssFqvEayRVU0obAVwStVM92zJMWNrYKCVQqARLUyh3JDAp1JI6RQeyGjYLP/uEPoKfzcYIMbeXGiIA7FjBUA6ttGgyBD6Rq+rMS3jJSnMW6TZKjjOMoKD0yZAeadbZbhZ0A4Qo2Jq4m18nlMgOCZ7jMdXuWY6xB6qyPiXVe/HdaGr9ZfGnQSS+kxVW4vCNl7NQj7BgVDHAlQ93AkB7oyJ5uG9vZ3zQ41EHm9lffl2CUmG1B4HSmNQb0/GJTnWvwypFp4mbCNvJKKTh/7DjdV64BbRtWev8JzDueR6GFnb01rkZCgucGvPVj6t6tCQN4DmKR0wE8AZLrpZ89chwAF7ERbxD65ci61xHKeYihMOQ5gTGEqPAimX+lmVX0UKGvDgOLRKQM4p/bLzROfCvYy8OEqvH0BHHMhrhdKJLqZVFObuqIBpdMSkLXXCXc/rrXGQ2Ivqs5Rolbz+vabzWM3VSSr4= X-Forefront-Antispam-Report: CIP:192.176.1.74; CTRY:SE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:oa.msg.ericsson.com; PTR:office365.se.ericsson.net; CAT:NONE; SFS:(13230031)(36860700004)(46966006)(40470700004); DIR:OUT; SFP:1101; X-OriginatorOrg: ericsson.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2024 08:43:07.7797 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b1e7dab-4272-49f2-f5e8-08dc31eff657 X-MS-Exchange-CrossTenant-Id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=92e84ceb-fbfd-47ab-be52-080c6b87953f; Ip=[192.176.1.74]; Helo=[oa.msg.ericsson.com] X-MS-Exchange-CrossTenant-AuthSource: DB1PEPF000509F5.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR07MB6459 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Add cache guard to per-lcore data structures to prevent false sharing in scenarios where a next-N-lines (or similar) hardware prefetcher is used. Signed-off-by: Mattias Rönnblom --- lib/dispatcher/rte_dispatcher.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/dispatcher/rte_dispatcher.c b/lib/dispatcher/rte_dispatcher.c index 95dd41b818..f546d75c0b 100644 --- a/lib/dispatcher/rte_dispatcher.c +++ b/lib/dispatcher/rte_dispatcher.c @@ -48,6 +48,7 @@ struct rte_dispatcher_lcore { struct rte_dispatcher_lcore_port ports[EVD_MAX_PORTS_PER_LCORE]; struct rte_dispatcher_handler handlers[EVD_MAX_HANDLERS]; struct rte_dispatcher_stats stats; + RTE_CACHE_GUARD; } __rte_cache_aligned; struct rte_dispatcher { -- 2.34.1