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 2A05B45879; Tue, 27 Aug 2024 17:32:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E9EB140E2D; Tue, 27 Aug 2024 17:32:12 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2067.outbound.protection.outlook.com [40.107.94.67]) by mails.dpdk.org (Postfix) with ESMTP id C3E2B40E1B for ; Tue, 27 Aug 2024 17:32:10 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oC3zeKrVRu/BndHJKKhSXzpR9RfY2rgEWbvm7RdXeb4yHc3Pa1HL6rbGuPb3s8xdbGlxuTLejWK84gVX0TrvMjspQtom6r2MSi2L0DjzAQvwpo3BHcTQo2OZKdo1jENyLxP3QcARmrQY25DV27ukKAZMhBFwoTS7oxAtqJYE8JCJZ21GyrqNurY11RqG5WF0FE9GNwUKGsxwHBo89G2kpnQSn28Iyy688pQU5AglU6F3hqE7E/HJFxXgAu6xVfPL9Pkc3yz+iJwsSjLXzgygcqH5HtogOdb4J9u4WjnCYanY6b4W0bWJvrbxC7GhNojKYnq9YfO2b1ZEVbarMxHmdQ== 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=8DsJbt8lMtN/MZskoJ8Mbw0S2x2Ptb9ARzA2nV9/K7M=; b=yQOPNmfRv3cSsptWDpIo9ouIIn13Q994GOVkkSR99gQ3EerkRb+2ipzI/eYCFAwjW5uIWFJY5lsZUowgJHkHQyngKQLFjrqQ4K9is0lM3t5nTXuoRxMWIclcO4pIGF+GBiDCkfBg40MFLqcNtgiLoXf7xup6HWfDuhBekP8jUO2/pscAfxRTZGWKT32eARLKsDytv645LfH4OSWIP/UAiNoN2sll892sIIfoUVcFBPsW7YAeqymo5V5JhH+D6F3YjEMY8yKjfFDJqERTSH0h7K+D4vp7aRef9Y0Ukkk7Yy+8/ZHZkr/bRGhcQ5u8OarBVTN2XZSp6U1TZkqdXPK64g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=8DsJbt8lMtN/MZskoJ8Mbw0S2x2Ptb9ARzA2nV9/K7M=; b=tOQDLHF2x15Nhm7Yn4518UsfKgyc1q4ZIi8uYNZ/3qdrx2ysMdoB6V2hMMbmyLQ0pzufx/TojTYS2Llx+DXTOEztC2CSMNZXH5mbUzIY35w7eyVLJjuOllT/Xh1FKMWKSQegkEajT1bR+k7OW9vjEs9bNNYgRu6mCdGbbnPwnjE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB8596.namprd12.prod.outlook.com (2603:10b6:510:1b7::6) by PH7PR12MB5595.namprd12.prod.outlook.com (2603:10b6:510:135::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.24; Tue, 27 Aug 2024 15:32:08 +0000 Received: from PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::a011:943d:7291:8069]) by PH7PR12MB8596.namprd12.prod.outlook.com ([fe80::a011:943d:7291:8069%5]) with mapi id 15.20.7897.021; Tue, 27 Aug 2024 15:32:08 +0000 Content-Type: multipart/alternative; boundary="------------tfNjW1f2q7IgL0DTJZg00BF5" Message-ID: Date: Tue, 27 Aug 2024 21:02:00 +0530 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/3] app/testpmd: add register keyword Content-Language: en-US To: Stephen Hemminger Cc: ferruh.yigit@amd.com, bruce.richardson@intel.com, konstantin.v.ananyev@yandex.ru, aman.deep.singh@intel.com, dev@dpdk.org References: <20240716063724.850-1-vipin.varghese@amd.com> <20240821143857.1972-1-vipin.varghese@amd.com> <20240821143857.1972-2-vipin.varghese@amd.com> <20240821075502.3faa0997@hermes.local> From: "Varghese, Vipin" In-Reply-To: <20240821075502.3faa0997@hermes.local> X-ClientProxiedBy: PN3PR01CA0074.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:9a::18) To PH7PR12MB8596.namprd12.prod.outlook.com (2603:10b6:510:1b7::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB8596:EE_|PH7PR12MB5595:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d9a8053-0949-4cb4-a65e-08dcc6ad693f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?amg4dFZZb3VyTDRFMVVrdHBhNVMvOURqRHhsekpxdElDZDFiZGFrOG83ZTJm?= =?utf-8?B?bUUzc0FNSllWWFBBaVh5SzZ6Ylpac2xzYWF2QkR3KzR0ejBXY0NjR2xuV2FV?= =?utf-8?B?SkVNRWx0TTFjS0lQQ3lOZVVnRVJZS2w0dC8yTTNLZ3YzOXBrNGZCM2NpYTBV?= =?utf-8?B?TG9qZ2hWV0FCenpLT1RSNjRmaFJobVh5aDBlUHdRZ0RBMmhLU3p4V0tVR1E5?= =?utf-8?B?TkJBbkpjNE90cHVBbXFadENVVDdKTWg2TzAwZm5TSittVVZ4ZWE0MDVNVmRO?= =?utf-8?B?UnFVeWQ1YXZIYkFhU0hvZ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2NXVCWnV0N21iQ0xOT2NOaFRMOFd0dDBUcmxQcGgxLzFWRExvZmtZ?= =?utf-8?B?NGgvSjdsa29LZCsweC9LN1NxNkQwWWdKMHY1TWRZWVhwNlByK242SEpoSk5y?= =?utf-8?B?Ry9VeG0vYVdoRE9UcDQ0S3UrY3NvVlBudE8vSjBPZzA3b1BvS0kzT3UvbEFU?= =?utf-8?B?UGovWnY5M1NUU3g0cEhrOHlLcWIzK1lDU1crN1VERWdPZm5nY2g0OG1Gb0tX?= =?utf-8?B?YWphNElzV21LTjkzblluYVJFd2lmbGxsT3BpTTZoT0JqRmdTRkJnWjhEWkdX?= =?utf-8?B?ajI5UHV1Um9MeHVaZU1UL3ZudFBHZ24rcWsxRGV4SGZ6YnBTc2VjRytTWklM?= =?utf-8?B?T3NJcmFRdG1ESmhLNXhxNDN4WXJ5eUVvK3Z4UVlWVTBxMTVZWlpRWWxudHdp?= =?utf-8?B?OUlBSjJ5RHNSNENJOUw2ZVZSVll3L1ZrZHVBVFhNcjhBOXJsY2orMFZKem04?= =?utf-8?B?ZW5rMW5xZzJGYUtRVzlkWHFBWEZvaklYVXk4UXRQb3MyUzQvaGFHOGNCK1FU?= =?utf-8?B?WnJXdlVGZGRjNFFBWXZxaTlVOVdUU1dNWDhyMWZTZnFpakFNS0ROUm5WYmNT?= =?utf-8?B?TlBKSkQvdnZtZDZuaGp0dz09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR12MB8596.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UDR5Tm5HanpmRlY1RGJjZlRiL2RDNnBaSnR6b2ZrY3R6NDYzdVBGeFZTYm02?= =?utf-8?B?Z1UxbG5BMWkxdUZQQVR4RSswOStNUH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K3dMeWlYbnU0QW93?= =?utf-8?B?bXpwc3BHQlRkWEZIQnhNUERMdHluNVVDY1VPY3Zkd1l1QmxBcUQxZ2ZqLzlC?= =?utf-8?B?Q1NlWmUrbVEzN0pTcnR3azBBKzRIVlA4dG5Qd1BMTllFY2hkR2lSV3gxSmJ5?= =?utf-8?B?Tk80MUx6R203YXNhSDJhMGM4MEhjWDFxNXZuYWtUbmdNR0dja3hCcSt1WERy?= =?utf-8?B?REc2RmtBc05NWFBleFpRQ2E2RnU3THNRMEY4VHlhWGRoeVFnQzBvVTZXc1dm?= =?utf-8?Q?OjNxbFlTTjR80fYgLriWVScQp?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8d9a8053-0949-4cb4-a65e-08dcc6ad693f X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB8596.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Aug 2024 15:32:08.0983 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: JNG71abfyOIQr5obq0+CkLJuwaFOk7oGECxJo5yhekh5rGqzKVplnqXJr1fiPriZ6isQVEdkp8ouPs4RaGLowQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5595 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 --------------tfNjW1f2q7IgL0DTJZg00BF5 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/21/2024 8:25 PM, Stephen Hemminger wrote: > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > On Wed, 21 Aug 2024 20:08:55 +0530 > Vipin Varghese wrote: > >> 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; > Some compilers treat register as a no-op. Are you sure? Did you check with godbolt. Thank you Stephen, I have tested the code changes on Linux using GCC and Clang compiler. In both cases in Linux environment, we have seen the the values loaded onto register `xmm`. ``` registerconst__m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6); vmovdqaxmm0, xmmwordptr[rip+ .LCPI0_0] ``` Both cases we have performance improvement. Can you please help us understand if we have missed out something? --------------tfNjW1f2q7IgL0DTJZg00BF5 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 8/21/2024 8:25 PM, Stephen Hemminger wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.


On Wed, 21 Aug 2024 20:08:55 +0530
Vipin Varghese <vipin.varghese@amd.com> wrote:

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;
Some compilers treat register as a no-op. Are you sure? Did you check with godbolt.

Thank you Stephen, I have tested the code changes on Linux using GCC and Clang compiler. 

In both cases in Linux environment, we have seen the the values loaded onto register `xmm`.

```
register const __m128i shfl_msk = _mm_set_epi8(15, 14, 13, 12, 5, 4, 3, 2, 1, 0, 11, 10, 9, 8, 7, 6);
vmovdqa xmm0, xmmword ptr [rip + .LCPI0_0]

```

Both cases we have performance improvement.


Can you please help us understand if we have missed out something?


    
--------------tfNjW1f2q7IgL0DTJZg00BF5--