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 4AF3645830; Wed, 21 Aug 2024 16:39:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAEA5410E3; Wed, 21 Aug 2024 16:39:24 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2074.outbound.protection.outlook.com [40.107.243.74]) by mails.dpdk.org (Postfix) with ESMTP id E79C3410DF for ; Wed, 21 Aug 2024 16:39:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zJvE2BgdftFl4qsG3fTMyOCyzeXKDvFdugwhzjRd0gSOHrfiHWt+6IsYo+1yTDuYjky/WNsuTy6jjhGK8yMUpbIUPQ2M6bymBAoRbmcf2zpYZoDkzWlpktKDd/1jko/EHU8vvrjGNfHZwYIlP9cL+rh7NTERxpBW4k04nDL0f4rFP02VAah72wpSB+eUgB9vaDEhtR3CgCHrWLzhIj1EzHtX8+o4QpXnSvQxVOmQcWk3DT5hAH1mF2LFDQ2/ZAYuDOxuuCKBWA2/I+9V4oxCJwsbh5mnF8TIqySCuqAOc4fttXgKJZWGlH/6jQUyy/HuG3iPkUg/DUO12Qs77mq2Cw== 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=CziQ5vj0v7bNnkIK7xyKZoVxerVzTR/y9zbhnkxd2yE=; b=akE/y9DUSCDz6kHWZpkc0bcCKKBauAmgvrA1kYGsKDqqNoLbw+/wIvkPrBhZJWEZYpY985AiUaFrbK+DtYGmG3A/gxLj5YXI3mgsP8S4NTVzMh/u8aUynNm/fos81Gv2ouUBkgzM5gYY+hglFhnxNsgBwSN9yywrNqQZGU9mu8DFZnkvO14jgQhqhrAFTrQyb3gGhCDEKxVXw7rppU8XLhHMP/0NvBJ66FeO6BN/fYbO6wGQJXm2fmyTfoxe0H1s4MImLTmeLDUMHBemtTEsRpO9KiAiYAXlk6G2NvWN6KCVUDxNP3sFCjB1kZEJJN6wWl11ynG0GXwbHxLbLD1DRQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=intel.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CziQ5vj0v7bNnkIK7xyKZoVxerVzTR/y9zbhnkxd2yE=; b=G9O7o/iJtMHzdedIcYtarr4kapMoGHFNNFyj6qt6Ws7VXZzWvt65Jdyz7bogFWI7qWKU+AqpznhaiCNAIXHhUwaNDcIQtHI8yzhPOwng9xJAh1I2u1Mxok4fKeK88Y+ADe781bbboEBmkXh7ryUPAc2us/s/1wwwF+XW5ZCbOjo= Received: from BN0PR03CA0041.namprd03.prod.outlook.com (2603:10b6:408:e7::16) by MW4PR12MB5642.namprd12.prod.outlook.com (2603:10b6:303:187::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.16; Wed, 21 Aug 2024 14:39:19 +0000 Received: from BL6PEPF00020E5F.namprd04.prod.outlook.com (2603:10b6:408:e7:cafe::74) by BN0PR03CA0041.outlook.office365.com (2603:10b6:408:e7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21 via Frontend Transport; Wed, 21 Aug 2024 14:39:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BL6PEPF00020E5F.mail.protection.outlook.com (10.167.249.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7897.11 via Frontend Transport; Wed, 21 Aug 2024 14:39:18 +0000 Received: from BLR-5CG134626B.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 21 Aug 2024 09:39:16 -0500 From: Vipin Varghese To: , , , , Subject: [PATCH v2 1/3] app/testpmd: add register keyword Date: Wed, 21 Aug 2024 20:08:55 +0530 Message-ID: <20240821143857.1972-2-vipin.varghese@amd.com> X-Mailer: git-send-email 2.41.0.windows.3 In-Reply-To: <20240821143857.1972-1-vipin.varghese@amd.com> References: <20240716063724.850-1-vipin.varghese@amd.com> <20240821143857.1972-1-vipin.varghese@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E5F:EE_|MW4PR12MB5642:EE_ X-MS-Office365-Filtering-Correlation-Id: f691f025-0210-4157-bc31-08dcc1ef0a07 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?l/U5/ogxl2n+GhfP05F8OFt4zymbvPRvs74KoS5ABIU2d3iNOCy2nDe7bcGd?= =?us-ascii?Q?+hFYkkYkkFXx/Ewxs3uDAEF6RBRRK4Ed5LIL903423C6kfRMKNuzBxCpDaPz?= =?us-ascii?Q?IvkWhQXGh0vIB2OredwkRTETdawWyGbrkfpB24FiBydjXyyqTbNVI5tbouWU?= =?us-ascii?Q?PVA4oXSwlhoSUyvzynxbKIwPhsc3K9gfbqiWwKEPHfO2ZKeA6hfV/+1Z6fLK?= =?us-ascii?Q?y6wkKdzgv5YmstwrACY8d3i2dkp8ndu98ePv9gOXN7lIf82sZUwc35dPPfm+?= =?us-ascii?Q?CO/F9+uhY+/z9K3YdQfL1ngRKPGbHlPXxgHqoIXw29skPnI/Rqc+Igi/6SKC?= =?us-ascii?Q?eJgCBWwd+MNtheEteuPnupkpZBx21j9EI8LdTxFbtXB2yscCDctQOBdjjslt?= =?us-ascii?Q?Z0f9oCLEPYd/AbX9DNfgB1064zNKzA20eFp350cMen6hjdEhnitVxB8n2saG?= =?us-ascii?Q?2r7lGUI0jv8RykSMqx4GFqeciY9YOMjJp3dA5L1QAYASzezHdhMOpruP02nO?= =?us-ascii?Q?rl/FppIrm95tvIVYlika8ctt+zy5rI0DAiWkQB+ojZkM+q6bFxrUKBHpKCPR?= =?us-ascii?Q?NhTWVgDyxn0IHWUAm2vZb1UHhOwbXurDW9ZcZ//HsmmiR538FYJangayIm0g?= =?us-ascii?Q?jWEfhuSPcdpQvj0r7APSXQydvn0Y3zv+VLoqAIsQUB+C90P8CZStG9ygSBET?= =?us-ascii?Q?E/Dcr/B0lHHGvTcit9EqYbH/K0aCJjm4gOZ4bFyKEb6soPdJETOr9a6vVArU?= =?us-ascii?Q?4ZvgHSEY0/C13LOJI3yv2Qy2WhT7KrYyguiLcQBaSxiZBom7+1MLf3PjqDeG?= =?us-ascii?Q?BSgOIl827G4b1xFI3v4HnIS0DhL8/KAMN9UyHM6l9HAW5z3Wn2E/tgL0EwA8?= =?us-ascii?Q?XNuxK7v20dO1BjXcItxQema5X4h208zrnA7obbhkJXs0gOCxqHpUhET6a55t?= =?us-ascii?Q?VzeKgRJalXiJu/OH1Fj3JfHafT0F/4TwF1Igxa9GYN8D5cJoP+0tAUxVMzdK?= =?us-ascii?Q?RfK9RJoQw3iNsHXfdUWdJU5/Txot1jjNawqxBdVT9d+dplJsN9MB5CsJEJ6O?= =?us-ascii?Q?ZHtrwZdLEIL6FXeD/GkRxiFUauE3f6bgmESj1ny7NW1evbjFA9OfLzZssQ9D?= =?us-ascii?Q?SU39/3QnncgowZT6rrfsdel3QoxAbxKYwZD5CEdK4SWahZWgbqR7bTvUf3q+?= =?us-ascii?Q?009OLWnQixCT//b7piuQCGsCURq1MmXQLhxfgn8vple3b4rqObu1DryOnOD3?= =?us-ascii?Q?zf3eDU5PnXQ9TSXbzz72wcexE6H6GXSoL/bnPZYhWDyspiycntctztiDmJkK?= =?us-ascii?Q?MD0fAbUhm5nsRdJfhULFZhLpbVi86Y6yNRemKxyGjHvFdlyLQY5nPa7rT/2y?= =?us-ascii?Q?rCtpLj7NXahbZLSmCq71efvQSH1r0x86dSWLsjnpBUYEKWGIW3dbx1ua4ven?= =?us-ascii?Q?026R3rB/GFnbyTrCijZ3qMWqpTTj60+D?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2024 14:39:18.8610 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f691f025-0210-4157-bc31-08dcc1ef0a07 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E5F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB5642 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 Currently SSE SIMD variables are declared as stack variables. Allowing the use of keyword register for shuffle mask and address variables, improves the mac-swap Mpps by 1 for single queue. Test Result: * Platform: AMD EPYC 9554 @3.1GHz, no boost * Test scenarios: TEST-PMD 64B IO vs MAC-SWAP * NIC: broadcom P2100: loopback 2*100Gbps ------------------------------------------------ - IO: 47.23 : 46.0 - MAC-SWAP original: 45.75 : 43.8 - MAC-SWAP register mod 45.73 : 44.83 Signed-off-by: Vipin Varghese --- app/test-pmd/macswap_sse.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/macswap_sse.h b/app/test-pmd/macswap_sse.h index 223f87a539..29088843b7 100644 --- a/app/test-pmd/macswap_sse.h +++ b/app/test-pmd/macswap_sse.h @@ -16,13 +16,13 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb, uint64_t ol_flags; int i; int r; - __m128i addr0, addr1, addr2, addr3; + register __m128i addr0, addr1, addr2, addr3; /** * shuffle mask be used to shuffle the 16 bytes. * byte 0-5 wills be swapped with byte 6-11. * byte 12-15 will keep unchanged. */ - __m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12, + register const __m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6); -- 2.34.1